mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
More fixes to /freeze
This commit is contained in:
parent
c1fff71e33
commit
019dea18e9
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user