diff --git a/Bukkit/src/main/resources/plugin.yml b/Bukkit/src/main/resources/plugin.yml index b93429cad..92c67adad 100644 --- a/Bukkit/src/main/resources/plugin.yml +++ b/Bukkit/src/main/resources/plugin.yml @@ -189,6 +189,8 @@ permissions: default: false plots.template: default: false + plots.components: + default: false plots.admin: default: false @@ -292,6 +294,8 @@ permissions: default: false plots.admin.command.blocked-cmds.road: default: false + plots.admin.components.other: + default: false plots.teleport.delay.bypass: default: false diff --git a/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java b/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java index af5d2dc16..e6e3b688d 100644 --- a/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java +++ b/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java @@ -33,6 +33,7 @@ import com.plotsquared.core.configuration.caption.TranslatableCaption; import com.plotsquared.core.configuration.file.YamlConfiguration; import com.plotsquared.core.configuration.serialization.ConfigurationSerialization; import com.plotsquared.core.generator.ClassicPlotManagerComponent; +import com.plotsquared.core.permissions.Permission; import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.plot.Plot; import com.plotsquared.core.plot.PlotInventory; @@ -159,7 +160,7 @@ public class ComponentPresetManager { } else if (!plot.hasOwner()) { player.sendMessage(TranslatableCaption.of("info.plot_unowned")); return null; - } else if (!plot.isOwner(player.getUUID()) && !plot.getTrusted().contains(player.getUUID())) { + } else if (!plot.isOwner(player.getUUID()) && !plot.getTrusted().contains(player.getUUID()) && !Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_COMPONENTS_OTHER)) { player.sendMessage(TranslatableCaption.of("permission.no_plot_perms")); return null; } else if (plot.getVolume() > Integer.MAX_VALUE) { diff --git a/Core/src/main/java/com/plotsquared/core/permissions/Permission.java b/Core/src/main/java/com/plotsquared/core/permissions/Permission.java index 78981040f..b288ec3b3 100644 --- a/Core/src/main/java/com/plotsquared/core/permissions/Permission.java +++ b/Core/src/main/java/com/plotsquared/core/permissions/Permission.java @@ -202,7 +202,8 @@ public enum Permission { PERMISSION_ADMIN_ALLOW_UNSAFE("plots.admin.unsafe"), PERMISSION_ADMIN_DEBUG_OTHER("plots.admin.debug.other"), PERMISSION_RATE("plots.rate"), - PERMISSION_ADMIN_FLIGHT("plots.admin.flight"); + PERMISSION_ADMIN_FLIGHT("plots.admin.flight"), + PERMISSION_ADMIN_COMPONENTS_OTHER("plots.admin.component.other"); // private final String text;