Added new "worldborder.bypass" permission which will allow a person to move around outside the border without being knocked back. This permission is not granted to anyone by default, even Ops, and is not included in the "worldborder.*" permission set.

Thanks to st-remy and guyag for pull requests close to what I ended up implementing here.
This commit is contained in:
Brettflan 2012-10-19 00:55:08 -05:00
parent 6197a6e320
commit 0ba6b59837
3 changed files with 8 additions and 3 deletions

View File

@ -46,6 +46,10 @@ public class BorderCheckTask implements Runnable
if (border.insideBorder(loc.getX(), loc.getZ(), Config.ShapeRound()))
return null;
// if player has "worldborder.bypass" permission, allow them beyond border
if (Config.HasPermission(player, "bypass"))
return null;
Location newLoc = newLocation(player, loc, border);
if (Config.whooshEffect())

View File

@ -283,8 +283,6 @@ public class Config
{
if (player == null) // console, always permitted
return true;
else if (player.isOp()) // Op, always permitted
return true;
if (player.hasPermission("worldborder." + request)) // built-in Bukkit superperms
return true;

View File

@ -31,7 +31,7 @@ commands:
/<command> debug <on/off> - turn debug mode on or off.
permissions:
worldborder.*:
description: Grants all WorldBorder permissions
description: Grants all WorldBorder permissions, except for bypass
children:
worldborder.set: true
worldborder.radius: true
@ -105,3 +105,6 @@ permissions:
worldborder.dynmapmsg:
description: Can set the label text for borders shown in DynMap
default: op
worldborder.bypass:
description: Can go beyond the border without being knocked back
default: none