Adding place splattermap permission
This commit is contained in:
parent
483a0a29f0
commit
5f2623d709
|
@ -46,6 +46,7 @@ public enum Permissions {
|
||||||
GET("imageonmap.get"),
|
GET("imageonmap.get"),
|
||||||
GETOTHER("imageonmap.getother"),
|
GETOTHER("imageonmap.getother"),
|
||||||
RENAME("imageonmap.rename"),
|
RENAME("imageonmap.rename"),
|
||||||
|
PLACE_SPLATTER_MAP("imageonmap.placesplattermap"),
|
||||||
REMOVE_SPLATTER_MAP("imageonmap.removesplattermap"),
|
REMOVE_SPLATTER_MAP("imageonmap.removesplattermap"),
|
||||||
DELETE("imageonmap.delete"),
|
DELETE("imageonmap.delete"),
|
||||||
DELETEOTHER("imageonmap.deleteother"),
|
DELETEOTHER("imageonmap.deleteother"),
|
||||||
|
|
|
@ -251,6 +251,13 @@ public class MapItemManager implements Listener {
|
||||||
if (!MapManager.managesMap(mapItem)) {
|
if (!MapManager.managesMap(mapItem)) {
|
||||||
return;
|
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));
|
frame.setItem(new ItemStack(Material.AIR));
|
||||||
if (SplatterMapManager.hasSplatterAttributes(mapItem)) {
|
if (SplatterMapManager.hasSplatterAttributes(mapItem)) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue