mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 10:14:42 +02:00
Add administrative override for /plot components
This commit is contained in:
@ -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) {
|
||||
|
@ -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");
|
||||
//</editor-fold>
|
||||
|
||||
private final String text;
|
||||
|
Reference in New Issue
Block a user