Resolves kicking of a higher ranked Member

This commit is contained in:
ulumulu1510 2015-02-25 20:36:47 +01:00 committed by Olof Larsson
parent aa4645b036
commit c65da10b52

View File

@ -46,7 +46,7 @@ public class CmdFactionsKick extends FactionsCommand
// Validate
if (msender == mplayer)
{
msg("<b>You cannot kick yourself.");
msg("<b>You can't kick yourself.");
msg("<i>You might want to: %s", Factions.get().getOuterCmdFactions().cmdFactionsLeave.getUseageTemplate(false));
return;
}
@ -57,9 +57,15 @@ public class CmdFactionsKick extends FactionsCommand
return;
}
if (mplayer.getRole().compareTo(msender.getRole()) < 0 && !(this.senderIsConsole || msender.isUsingAdminMode()))
{
msg("<b>You can't kick people of higher rank than yourself.");
return;
}
if ( ! MConf.get().canLeaveWithNegativePower && mplayer.getPower() < 0 && ! msender.isUsingAdminMode())
{
msg("<b>You cannot kick that member until their power is positive.");
msg("<b>You can't kick that person until their power is positive.");
return;
}