Adding place splattermap permission

This commit is contained in:
Boy 2021-05-16 02:35:14 +02:00
parent 483a0a29f0
commit 5f2623d709
2 changed files with 8 additions and 0 deletions

View File

@ -46,6 +46,7 @@ public enum Permissions {
GET("imageonmap.get"),
GETOTHER("imageonmap.getother"),
RENAME("imageonmap.rename"),
PLACE_SPLATTER_MAP("imageonmap.placesplattermap"),
REMOVE_SPLATTER_MAP("imageonmap.removesplattermap"),
DELETE("imageonmap.delete"),
DELETEOTHER("imageonmap.deleteother"),

View File

@ -251,6 +251,13 @@ public class MapItemManager implements Listener {
if (!MapManager.managesMap(mapItem)) {
return;
}
if (!Permissions.PLACE_SPLATTER_MAP.grantedTo(player)) {
player.sendMessage(ChatColor.RED + "You do not have permission to place splatter maps.");
event.setCancelled(true);
return;
}
frame.setItem(new ItemStack(Material.AIR));
if (SplatterMapManager.hasSplatterAttributes(mapItem)) {