Added Debug Messages

This commit is contained in:
alisolarflare 2016-12-22 05:16:04 -05:00
parent 8f8d175609
commit 01cc741e33

View file

@ -16,8 +16,13 @@ public class CreativeKillLoop extends BukkitRunnable implements Listener {
@Override @Override
public void run() { public void run() {
plugin.getServer().broadcastMessage("CreativeLoop");
for (Player player : plugin.getServer().getOnlinePlayers()){ for (Player player : plugin.getServer().getOnlinePlayers()){
if(player.getGameMode() != GameMode.SURVIVAL && player.getWorld().getName() == "World" && player.isOp() == false){ player.sendMessage("Player: " + player.getName());
player.sendMessage("World: " + player.getWorld());
player.sendMessage("Gamemode : " + player.getGameMode().toString());
player.sendMessage("IsOP: " + player.isOp());
if(player.getGameMode() != GameMode.SURVIVAL && player.getWorld().getName().equalsIgnoreCase("world") && player.isOp() == false){
player.sendMessage("[Hotfix] Every Gamemode other than survival is disabled in the new world!"); player.sendMessage("[Hotfix] Every Gamemode other than survival is disabled in the new world!");
player.setGameMode(GameMode.SURVIVAL); player.setGameMode(GameMode.SURVIVAL);
} }