3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-28 17:10:13 +01:00

Update BungeePlugin.java (#2080)

Dieser Commit ist enthalten in:
terrarier2111 2020-09-12 17:43:09 +02:00 committet von GitHub
Ursprung 5f1472a18d
Commit 9a6b0664e3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -40,7 +40,7 @@ public class BungeePlugin extends Plugin implements ViaPlatform<ProxiedPlayer>,
@Override @Override
public void onLoad() { public void onLoad() {
try { try {
ProtocolConstants.class.getField("MINECRAFT_1_15_2"); ProtocolConstants.class.getField("MINECRAFT_1_16_3");
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) {
getLogger().warning(" / \\"); getLogger().warning(" / \\");
getLogger().warning(" / \\"); getLogger().warning(" / \\");
@ -136,8 +136,9 @@ public class BungeePlugin extends Plugin implements ViaPlatform<ProxiedPlayer>,
@Override @Override
public boolean kickPlayer(UUID uuid, String message) { public boolean kickPlayer(UUID uuid, String message) {
if (getProxy().getPlayer(uuid) != null) { ProxiedPlayer player = getProxy().getPlayer(uuid);
getProxy().getPlayer(uuid).disconnect(message); if (player != null) {
player.disconnect(message);
return true; return true;
} }
return false; return false;