Added toggle for /freeze and a message when unfreezing a player.

This commit is contained in:
nossr50 2010-12-15 16:25:25 -08:00
parent ad29bb2bbb
commit d0c33562b4
2 changed files with 3 additions and 1 deletions

View File

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

View File

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