From 019dea18e9d78399861da56e0274be015a817de7 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Wed, 15 Dec 2010 16:53:25 -0800 Subject: [PATCH] More fixes to /freeze --- vMinecraftCommands.java | 5 +++-- vMinecraftListener.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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); } }