Work on TerritoryAccess and permissions.
This commit is contained in:
@@ -39,7 +39,7 @@ public class CmdFactionsClaim extends FCommand
|
||||
if (forFaction == null) return;
|
||||
|
||||
// FPerm
|
||||
if (forFaction.isNormal() && !FPerm.TERRITORY.has(sender, forFaction, true)) return;
|
||||
if (forFaction.isNormal() && !FPerm.TERRITORY.has(usender, forFaction, true)) return;
|
||||
|
||||
// Validate
|
||||
if (radius < 1)
|
||||
|
@@ -36,7 +36,7 @@ public class CmdFactionsDisband extends FCommand
|
||||
if (faction == null) return;
|
||||
|
||||
// FPerm
|
||||
if ( ! FPerm.DISBAND.has(sender, faction, true)) return;
|
||||
if ( ! FPerm.DISBAND.has(usender, faction, true)) return;
|
||||
|
||||
// Verify
|
||||
if (faction.getFlag(FFlag.PERMANENT))
|
||||
|
@@ -46,7 +46,7 @@ public class CmdFactionsInvite extends FCommand
|
||||
}
|
||||
|
||||
// FPerm
|
||||
if ( ! FPerm.INVITE.has(sender, usenderFaction, true)) return;
|
||||
if ( ! FPerm.INVITE.has(usender, usenderFaction, true)) return;
|
||||
|
||||
// Event
|
||||
FactionsEventInvitedChange event = new FactionsEventInvitedChange(sender, uplayer, usenderFaction, newInvited);
|
||||
|
@@ -57,7 +57,7 @@ public class CmdFactionsKick extends FCommand
|
||||
|
||||
// FPerm
|
||||
Faction uplayerFaction = uplayer.getFaction();
|
||||
if (!FPerm.KICK.has(sender, uplayerFaction, true)) return;
|
||||
if (!FPerm.KICK.has(usender, uplayerFaction, true)) return;
|
||||
|
||||
// Event
|
||||
FactionsEventMembershipChange event = new FactionsEventMembershipChange(sender, uplayer, FactionColls.get().get(uplayer).getNone(), MembershipChangeReason.KICK);
|
||||
|
@@ -57,7 +57,7 @@ public class CmdFactionsPerm extends FCommand
|
||||
}
|
||||
|
||||
// Do the sender have the right to change perms for this faction?
|
||||
if ( ! FPerm.PERMS.has(sender, faction, true)) return;
|
||||
if ( ! FPerm.PERMS.has(usender, faction, true)) return;
|
||||
|
||||
Rel rel = this.arg(2, ARRel.get());
|
||||
if (rel == null) return;
|
||||
|
@@ -42,7 +42,7 @@ public class CmdFactionsSethome extends FCommand
|
||||
}
|
||||
|
||||
// FPerm
|
||||
if ( ! FPerm.SETHOME.has(sender, faction, true)) return;
|
||||
if ( ! FPerm.SETHOME.has(usender, faction, true)) return;
|
||||
|
||||
// Verify
|
||||
if (!usender.isUsingAdminMode() && !faction.isValidHome(newHome))
|
||||
|
@@ -30,7 +30,7 @@ public class CmdFactionsUnclaim extends FCommand
|
||||
Faction newFaction = FactionColls.get().get(me).getNone();
|
||||
|
||||
// FPerm
|
||||
if (!FPerm.TERRITORY.has(sender, usenderFaction, true)) return;
|
||||
if (!FPerm.TERRITORY.has(usender, usenderFaction, true)) return;
|
||||
|
||||
// Apply
|
||||
if (usender.tryClaim(newFaction, chunk, true, true)) return;
|
||||
|
@@ -38,7 +38,7 @@ public class CmdFactionsUnclaimall extends FCommand
|
||||
Faction newFaction = FactionColls.get().get(faction).getNone();
|
||||
|
||||
// FPerm
|
||||
if (!FPerm.TERRITORY.has(sender, faction, true)) return;
|
||||
if (!FPerm.TERRITORY.has(usender, faction, true)) return;
|
||||
|
||||
// Apply
|
||||
BoardColl boardColl = BoardColls.get().get(faction);
|
||||
|
Reference in New Issue
Block a user