mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Added toggle for /freeze and a message when unfreezing a player.
This commit is contained in:
parent
ad29bb2bbb
commit
d0c33562b4
@ -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());
|
||||
|
@ -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;}
|
||||
|
Loading…
Reference in New Issue
Block a user