mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Add administrative override for /plot components
This commit is contained in:
parent
17f91c8eb9
commit
93ff778de0
@ -189,6 +189,8 @@ permissions:
|
|||||||
default: false
|
default: false
|
||||||
plots.template:
|
plots.template:
|
||||||
default: false
|
default: false
|
||||||
|
plots.components:
|
||||||
|
default: false
|
||||||
|
|
||||||
plots.admin:
|
plots.admin:
|
||||||
default: false
|
default: false
|
||||||
@ -292,6 +294,8 @@ permissions:
|
|||||||
default: false
|
default: false
|
||||||
plots.admin.command.blocked-cmds.road:
|
plots.admin.command.blocked-cmds.road:
|
||||||
default: false
|
default: false
|
||||||
|
plots.admin.components.other:
|
||||||
|
default: false
|
||||||
|
|
||||||
plots.teleport.delay.bypass:
|
plots.teleport.delay.bypass:
|
||||||
default: false
|
default: false
|
||||||
|
@ -33,6 +33,7 @@ import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
|||||||
import com.plotsquared.core.configuration.file.YamlConfiguration;
|
import com.plotsquared.core.configuration.file.YamlConfiguration;
|
||||||
import com.plotsquared.core.configuration.serialization.ConfigurationSerialization;
|
import com.plotsquared.core.configuration.serialization.ConfigurationSerialization;
|
||||||
import com.plotsquared.core.generator.ClassicPlotManagerComponent;
|
import com.plotsquared.core.generator.ClassicPlotManagerComponent;
|
||||||
|
import com.plotsquared.core.permissions.Permission;
|
||||||
import com.plotsquared.core.player.PlotPlayer;
|
import com.plotsquared.core.player.PlotPlayer;
|
||||||
import com.plotsquared.core.plot.Plot;
|
import com.plotsquared.core.plot.Plot;
|
||||||
import com.plotsquared.core.plot.PlotInventory;
|
import com.plotsquared.core.plot.PlotInventory;
|
||||||
@ -159,7 +160,7 @@ public class ComponentPresetManager {
|
|||||||
} else if (!plot.hasOwner()) {
|
} else if (!plot.hasOwner()) {
|
||||||
player.sendMessage(TranslatableCaption.of("info.plot_unowned"));
|
player.sendMessage(TranslatableCaption.of("info.plot_unowned"));
|
||||||
return null;
|
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"));
|
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||||
return null;
|
return null;
|
||||||
} else if (plot.getVolume() > Integer.MAX_VALUE) {
|
} else if (plot.getVolume() > Integer.MAX_VALUE) {
|
||||||
|
@ -202,7 +202,8 @@ public enum Permission {
|
|||||||
PERMISSION_ADMIN_ALLOW_UNSAFE("plots.admin.unsafe"),
|
PERMISSION_ADMIN_ALLOW_UNSAFE("plots.admin.unsafe"),
|
||||||
PERMISSION_ADMIN_DEBUG_OTHER("plots.admin.debug.other"),
|
PERMISSION_ADMIN_DEBUG_OTHER("plots.admin.debug.other"),
|
||||||
PERMISSION_RATE("plots.rate"),
|
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>
|
//</editor-fold>
|
||||||
|
|
||||||
private final String text;
|
private final String text;
|
||||||
|
Loading…
Reference in New Issue
Block a user