Update BungeePlugin.java (#2080)

This commit is contained in:
terrarier2111 2020-09-12 17:43:09 +02:00 committed by GitHub
parent 5f1472a18d
commit 9a6b0664e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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