mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Add override permission for /plot music
This commit is contained in:
parent
841eef6a52
commit
e28fb49015
@ -214,6 +214,8 @@ permissions:
|
||||
default: false
|
||||
plots.admin.caps.other:
|
||||
default: false
|
||||
plots.admin.music.other:
|
||||
default: false
|
||||
plots.admin.destroy.unowned:
|
||||
default: false
|
||||
plots.admin.destroy.groundlevel:
|
||||
|
@ -38,6 +38,7 @@ import com.plotsquared.core.plot.PlotItemStack;
|
||||
import com.plotsquared.core.plot.flag.PlotFlag;
|
||||
import com.plotsquared.core.plot.flag.implementations.MusicFlag;
|
||||
import com.plotsquared.core.util.InventoryUtil;
|
||||
import com.plotsquared.core.util.Permissions;
|
||||
import com.sk89q.worldedit.world.item.ItemTypes;
|
||||
import net.kyori.adventure.text.minimessage.Template;
|
||||
|
||||
@ -71,8 +72,11 @@ public class Music extends SubCommand {
|
||||
player.sendMessage(TranslatableCaption.of("errors.not_in_plot"));
|
||||
return false;
|
||||
}
|
||||
if (!plot.isAdded(player.getUUID())) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
if (!plot.isAdded(player.getUUID()) &&!Permissions
|
||||
.hasPermission(player, "plots.admin.music.other")) {
|
||||
player.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission"),
|
||||
Template.of("node", "plots.admin.music.other"));
|
||||
return true;
|
||||
}
|
||||
PlotInventory inv = new PlotInventory(this.inventoryUtil, player, 2, "Plot Jukebox") {
|
||||
|
@ -53,6 +53,7 @@ public enum Permission {
|
||||
PERMISSION_MERGE_OTHER("plots.merge.other"),
|
||||
PERMISSION_MERGE_KEEP_ROAD("plots.merge.keeproad"),
|
||||
PERMISSION_ADMIN_CAPS_OTHER("plots.admin.caps.other"),
|
||||
PERMISSION_ADMIN_MUSIC_OTHER("plots.admin.music.other"),
|
||||
PERMISSION_ADMIN_DESTROY_UNOWNED("plots.admin.destroy.unowned"),
|
||||
PERMISSION_ADMIN_DESTROY_GROUNDLEVEL("plots.admin.destroy.groundlevel"),
|
||||
PERMISSION_ADMIN_DESTROY_OTHER("plots.admin.destroy.other"),
|
||||
|
Loading…
Reference in New Issue
Block a user