More fixes to /freeze

This commit is contained in:
nossr50 2010-12-15 16:53:25 -08:00
parent c1fff71e33
commit 019dea18e9
2 changed files with 4 additions and 3 deletions

View File

@ -200,15 +200,16 @@ 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;
}
//=====================================================================

View File

@ -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);
}
}