From 51161bbb5579548cecff30f367c27a1ddcbe73cf Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Fri, 21 Oct 2011 18:20:31 +0200 Subject: [PATCH] Adding a couple of admin bypass commands. --- src/com/massivecraft/factions/FPlayer.java | 2 +- src/com/massivecraft/factions/cmd/CmdJoin.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/factions/FPlayer.java b/src/com/massivecraft/factions/FPlayer.java index cc5b0fa0..d80080e2 100644 --- a/src/com/massivecraft/factions/FPlayer.java +++ b/src/com/massivecraft/factions/FPlayer.java @@ -645,7 +645,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator return false; } - if (this.getRole().value < Role.MODERATOR.value) + if (this.getRole().value < Role.MODERATOR.value && ! this.isAdminBypassing()) { msg("You must be "+Role.MODERATOR+" to claim land."); return false; diff --git a/src/com/massivecraft/factions/cmd/CmdJoin.java b/src/com/massivecraft/factions/cmd/CmdJoin.java index 6fccc08f..347d894d 100644 --- a/src/com/massivecraft/factions/cmd/CmdJoin.java +++ b/src/com/massivecraft/factions/cmd/CmdJoin.java @@ -53,7 +53,7 @@ public class CmdJoin extends FCommand return; } - if( ! faction.getOpen() && ! faction.isInvited(fme)) + if( ! (faction.getOpen() || faction.isInvited(fme) || fme.isAdminBypassing())) { msg("This faction requires invitation."); faction.msg("%s tried to join your faction.", fme.getNameAndRelevant(faction));