From d0c33562b4cbbeaebff41292d1e2f6d41069f2a9 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Wed, 15 Dec 2010 16:25:25 -0800 Subject: [PATCH] Added toggle for /freeze and a message when unfreezing a player. --- vMinecraftCommands.java | 3 ++- vMinecraftSettings.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/vMinecraftCommands.java b/vMinecraftCommands.java index 957502a73..1f6187eea 100644 --- a/vMinecraftCommands.java +++ b/vMinecraftCommands.java @@ -184,7 +184,7 @@ public class vMinecraftCommands{ //Use: Freezes a player in place //===================================================================== public static int freeze(Player player, String[] args){ - if(player.canUseCommand("/freeze")){ + if(player.canUseCommand("/freeze") && vMinecraftSettings.getInstance().freeze()){ if (args.length < 2){ vMinecraftChat.gmsg(Colors.Rose + "Usage is /freeze [Player]"); return EXIT_SUCCESS; @@ -201,6 +201,7 @@ public class vMinecraftCommands{ } if(vMinecraftSettings.frozenplayers.contains(other)){ vMinecraftSettings.getInstance().removeFrozen(other.getName()); + vMinecraftChat.gmsg(player.getName() + Colors.Blue + " has unfrozen " + other.getName()); return EXIT_SUCCESS; } vMinecraftSettings.getInstance().addFrozen(other.getName()); diff --git a/vMinecraftSettings.java b/vMinecraftSettings.java index 214bc694a..df10540ef 100644 --- a/vMinecraftSettings.java +++ b/vMinecraftSettings.java @@ -212,6 +212,7 @@ public class vMinecraftSettings { public boolean ignore() {return ignore;} public boolean colors() {return colors;} public boolean nick() {return nick;} + public boolean freeze() {return freeze;} public boolean cmdFabulous() {return cmdFabulous;} public boolean cmdPromote() {return cmdPromote;} public boolean cmdDemote() {return cmdDemote;}