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