Fly-Command #18
@ -58,6 +58,8 @@ public class PlayerConnectionListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void handlePlayerKick(PlayerKickEvent event) {
|
public void handlePlayerKick(PlayerKickEvent event) {
|
||||||
|
if (LobbyPlayer.getLobbyPlayer(event.getPlayer()).isFly())
|
||||||
|
event.setCancelled(true);
|
||||||
if(event.getReason().equals("Flying is not enabled on this server") && event.getPlayer().getVehicle() instanceof EnderPearl)
|
if(event.getReason().equals("Flying is not enabled on this server") && event.getPlayer().getVehicle() instanceof EnderPearl)
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren