From bb5d766ba620d9cf62feed976693496472cbc9df Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Tue, 26 Jul 2016 07:35:11 -0400 Subject: [PATCH] Patch war point evasion by committing suicide in safezones --- .../game/clans/clans/commands/KillCommand.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/KillCommand.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/KillCommand.java index 611838bd7..7f9b6f85a 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/KillCommand.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/KillCommand.java @@ -1,15 +1,14 @@ package mineplex.game.clans.clans.commands; -import mineplex.game.clans.clans.ClansManager; -import mineplex.minecraft.game.classcombat.Skill.Global.Recharge; -import org.bukkit.entity.Player; - import mineplex.core.command.CommandBase; import mineplex.core.common.Rank; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; +import mineplex.game.clans.clans.ClansManager; import mineplex.minecraft.game.core.damage.DamageManager; +import org.bukkit.entity.Player; + public class KillCommand extends CommandBase { public KillCommand(DamageManager plugin) @@ -35,9 +34,14 @@ public class KillCommand extends CommandBase UtilPlayer.message(caller, F.main("Clans", "Please wait a bit before suiciding")); return; } + if (ClansManager.getInstance().getClanUtility().isSafe(caller.getLocation()) || (ClansManager.getInstance().getClanUtility().getClaim(caller.getLocation()) != null && ClansManager.getInstance().getClanUtility().getClaim(caller.getLocation()).Owner.equalsIgnoreCase("Spawn"))) + { + UtilPlayer.message(caller, F.main("Clans", "You cannot use this command whilst in a safezone!")); + return; + } UtilPlayer.message(caller, F.main("Clans", "You have imploded.")); caller.setHealth(0D); } -} +} \ No newline at end of file