diff --git a/vMinecraftCommands.java b/vMinecraftCommands.java index fb07c088c..9e437fecb 100644 --- a/vMinecraftCommands.java +++ b/vMinecraftCommands.java @@ -200,14 +200,15 @@ public class vMinecraftCommands{ vMinecraftChat.gmsg(Colors.Rose + "The player you specified has a higher rank than you"); return EXIT_SUCCESS; } - if(vMinecraftSettings.frozenplayers.contains(other)){ + if(vMinecraftSettings.getInstance().isFrozen(other.getName())){ vMinecraftSettings.getInstance().removeFrozen(other.getName()); vMinecraftChat.gmsg(player.getName() + Colors.Blue + " has unfrozen " + other.getName()); return EXIT_SUCCESS; - } + } else { vMinecraftSettings.getInstance().addFrozen(other.getName()); vMinecraftChat.gmsg(player.getName() + Colors.Blue + " has frozen " + other.getName()); return EXIT_SUCCESS; + } } return EXIT_SUCCESS; } diff --git a/vMinecraftListener.java b/vMinecraftListener.java index 44426e58b..355a39328 100644 --- a/vMinecraftListener.java +++ b/vMinecraftListener.java @@ -18,7 +18,7 @@ public class vMinecraftListener extends PluginListener { log.log(Level.INFO, "vMinecraft disabled"); } public void onPlayerMove(Player player, Location from, Location to) { - if(vMinecraftSettings.getInstance().isFrozen(player)){ + if(vMinecraftSettings.getInstance().isFrozen(player.getName())){ player.teleportTo(from); } }