geforkt von Mirrors/Paper
Implement OfflinePlayer#isConnected
Dieser Commit ist enthalten in:
Ursprung
badf809fef
Commit
1fc4ca9178
@ -54,6 +54,13 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
|
|||||||
return this.getPlayer() != null;
|
return this.getPlayer() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Paper start
|
||||||
|
@Override
|
||||||
|
public boolean isConnected() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Paper end
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
Player player = this.getPlayer();
|
Player player = this.getPlayer();
|
||||||
|
@ -261,6 +261,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
return this.server.getPlayer(this.getUniqueId()) != null;
|
return this.server.getPlayer(this.getUniqueId()) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Paper start
|
||||||
|
@Override
|
||||||
|
public boolean isConnected() {
|
||||||
|
return !this.getHandle().hasDisconnected();
|
||||||
|
}
|
||||||
|
// Paper end
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InetSocketAddress getAddress() {
|
public InetSocketAddress getAddress() {
|
||||||
if (this.getHandle().connection.protocol() == null) return null;
|
if (this.getHandle().connection.protocol() == null) return null;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren