Adding place splattermap permission
This commit is contained in:
parent
483a0a29f0
commit
5f2623d709
|
@ -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"),
|
||||
|
|
|
@ -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)) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue