mirror of
https://github.com/Brettflan/WorldBorder.git
synced 2025-01-23 16:01:23 +01:00
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:
parent
6197a6e320
commit
0ba6b59837
@ -46,6 +46,10 @@ public class BorderCheckTask implements Runnable
|
|||||||
if (border.insideBorder(loc.getX(), loc.getZ(), Config.ShapeRound()))
|
if (border.insideBorder(loc.getX(), loc.getZ(), Config.ShapeRound()))
|
||||||
return null;
|
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);
|
Location newLoc = newLocation(player, loc, border);
|
||||||
|
|
||||||
if (Config.whooshEffect())
|
if (Config.whooshEffect())
|
||||||
|
@ -283,8 +283,6 @@ public class Config
|
|||||||
{
|
{
|
||||||
if (player == null) // console, always permitted
|
if (player == null) // console, always permitted
|
||||||
return true;
|
return true;
|
||||||
else if (player.isOp()) // Op, always permitted
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (player.hasPermission("worldborder." + request)) // built-in Bukkit superperms
|
if (player.hasPermission("worldborder." + request)) // built-in Bukkit superperms
|
||||||
return true;
|
return true;
|
||||||
|
@ -31,7 +31,7 @@ commands:
|
|||||||
/<command> debug <on/off> - turn debug mode on or off.
|
/<command> debug <on/off> - turn debug mode on or off.
|
||||||
permissions:
|
permissions:
|
||||||
worldborder.*:
|
worldborder.*:
|
||||||
description: Grants all WorldBorder permissions
|
description: Grants all WorldBorder permissions, except for bypass
|
||||||
children:
|
children:
|
||||||
worldborder.set: true
|
worldborder.set: true
|
||||||
worldborder.radius: true
|
worldborder.radius: true
|
||||||
@ -105,3 +105,6 @@ permissions:
|
|||||||
worldborder.dynmapmsg:
|
worldborder.dynmapmsg:
|
||||||
description: Can set the label text for borders shown in DynMap
|
description: Can set the label text for borders shown in DynMap
|
||||||
default: op
|
default: op
|
||||||
|
worldborder.bypass:
|
||||||
|
description: Can go beyond the border without being knocked back
|
||||||
|
default: none
|
||||||
|
Loading…
Reference in New Issue
Block a user