This commit is contained in:
Magnus Ulf 2019-05-12 09:46:40 +02:00
parent a6af3c69c8
commit 1afc5d7988
2 changed files with 6 additions and 8 deletions

View File

@ -41,8 +41,7 @@ public class CmdFactionsFlagSet extends FactionsCommand
// Is this flag editable?
if (!msender.isOverriding() && ! flag.isEditable())
{
msg("<b>The flag <h>%s <b>is not editable.", flag.getName());
return;
throw new MassiveException().addMsg("<b>The flag <h>%s <b>is not editable.", flag.getName());
}
// Event
@ -54,8 +53,7 @@ public class CmdFactionsFlagSet extends FactionsCommand
// No change
if (faction.getFlag(flag) == value)
{
msg("%s <i>already has %s <i>set to %s<i>.", faction.describeTo(msender), flag.getStateDesc(value, false, true, true, false, true), flag.getStateDesc(value, true, true, false, false, false));
return;
throw new MassiveException().addMsg("%s <i>already has %s <i>set to %s<i>.", faction.describeTo(msender), flag.getStateDesc(value, false, true, true, false, true), flag.getStateDesc(value, true, true, false, false, false));
}
// Apply

View File

@ -43,22 +43,22 @@ public class CmdFactionsKick extends FactionsCommand
return;
}
if (mplayer.getRank().isLeader() && !msender.isOverriding())
if ( !msender.isOverriding() && mplayer.getRank().isLeader())
{
throw new MassiveException().addMsg("<b>The leader cannot be kicked.");
}
if (mplayer.getRank().isMoreThan(msender.getRank()) && ! msender.isOverriding())
if (! msender.isOverriding() && mplayer.getFaction() == msenderFaction && mplayer.getRank().isMoreThan(msender.getRank()) )
{
throw new MassiveException().addMsg("<b>You can't kick people of higher rank than yourself.");
}
if (mplayer.getRank() == msender.getRank() && ! msender.isOverriding())
if (! msender.isOverriding() && mplayer.getRank() == msender.getRank())
{
throw new MassiveException().addMsg("<b>You can't kick people of the same rank as yourself.");
}
if ( ! MConf.get().canLeaveWithNegativePower && mplayer.getPower() < 0 && ! msender.isOverriding())
if ( ! msender.isOverriding() && ! MConf.get().canLeaveWithNegativePower && mplayer.getPower() < 0)
{
msg("<b>You can't kick that person until their power is positive.");
return;