From c65da10b52d3cc2f8e74b851a4dd2cf599f10eed Mon Sep 17 00:00:00 2001 From: ulumulu1510 Date: Wed, 25 Feb 2015 20:36:47 +0100 Subject: [PATCH] Resolves kicking of a higher ranked Member --- src/com/massivecraft/factions/cmd/CmdFactionsKick.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java index 69cb447d..64330e82 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java @@ -46,7 +46,7 @@ public class CmdFactionsKick extends FactionsCommand // Validate if (msender == mplayer) { - msg("You cannot kick yourself."); + msg("You can't kick yourself."); msg("You might want to: %s", Factions.get().getOuterCmdFactions().cmdFactionsLeave.getUseageTemplate(false)); return; } @@ -56,10 +56,16 @@ public class CmdFactionsKick extends FactionsCommand msg("The leader can not be kicked."); return; } + + if (mplayer.getRole().compareTo(msender.getRole()) < 0 && !(this.senderIsConsole || msender.isUsingAdminMode())) + { + msg("You can't kick people of higher rank than yourself."); + return; + } if ( ! MConf.get().canLeaveWithNegativePower && mplayer.getPower() < 0 && ! msender.isUsingAdminMode()) { - msg("You cannot kick that member until their power is positive."); + msg("You can't kick that person until their power is positive."); return; }