Add warp permissions override, closes #30

This commit is contained in:
William278 committed 2021-04-16 14:52:54 +01:00
1 parent 9784623d45
commit e5d265a155
2 files changed
+4

No files matched your search

@@ -79,6 +79,7 @@ public class Warp extends TeleportationPoint {
}
p.recalculatePermissions();
String permissionFormat = HuskHomes.getSettings().getWarpRestrictionPermissionFormat();
if (p.hasPermission("huskhomes.warp.*") || p.hasPermission(permissionFormat + "*")) { return true; } // Always return true if they have the wildcard
for (PermissionAttachmentInfo permissionAI : p.getEffectivePermissions()) {
String permission = permissionAI.getPermission();
if (permission.contains(permissionFormat)) {
+3
View File
@@ -173,6 +173,9 @@ permissions:
huskhomes.warp:
description: Allows you to teleport to a warp
default: true
huskhomes.warp.*:
description: Lets you access all warps even if permission-restricted
default: false
huskhomes.setwarp:
description: Allows you to set server warps
default: false