Permission to teleport around besieged areas.

Intended for administrators.  Defaults on for server ops.
This commit is contained in:
ryanhamshire 2016-08-12 20:58:51 -07:00
parent 70b8c242e2
commit b5236aed9a
2 changed files with 8 additions and 1 deletions

View File

@ -245,6 +245,7 @@ permissions:
griefprevention.seeinactivity: true
griefprevention.eavesdropimmune: true
griefprevention.deleteclaimsinworld: true
griefprevention.siegeteleport: true
griefprevention.siegeimmune:
description: Makes a player immune to /Siege.
default: op
@ -352,4 +353,7 @@ permissions:
default: false
griefprevention.mostaccrued:
description: Players with this permission can accrue more claim blocks (limit specified in the config file).
default: false
default: false
griefprevention.siegeteleport:
description: Players with this permission can teleport into and out of besieged areas.
default: op

View File

@ -1071,6 +1071,9 @@ class PlayerEventHandler implements Listener
//these rules only apply to siege worlds only
if(!GriefPrevention.instance.config_siege_enabledWorlds.contains(player.getWorld())) return;
//these rules do not apply to admins
if(player.hasPermission("griefprevention.siegeteleport")) return;
Location source = event.getFrom();
Claim sourceClaim = this.dataStore.getClaimAt(source, false, playerData.lastClaim);
if(sourceClaim != null && sourceClaim.siegeData != null)