mirror of
https://github.com/zDevelopers/ImageOnMap.git
synced 2024-09-30 15:37:40 +02:00
Merge pull request #109 from Pugabyte/indev
Add permission to remove splattermap off wall, closes #53
This commit is contained in:
commit
7cae09ec6f
@ -44,6 +44,7 @@ public enum Permissions
|
|||||||
LIST("imageonmap.list"),
|
LIST("imageonmap.list"),
|
||||||
GET("imageonmap.get"),
|
GET("imageonmap.get"),
|
||||||
RENAME("imageonmap.rename"),
|
RENAME("imageonmap.rename"),
|
||||||
|
REMOVE_SPLATTER_MAP("imageonmap.removesplattermap"),
|
||||||
DELETE("imageonmap.delete"),
|
DELETE("imageonmap.delete"),
|
||||||
ADMINISTRATIVE("imageonmap.administrative"),
|
ADMINISTRATIVE("imageonmap.administrative"),
|
||||||
BYPASS_SIZE("imageonmap.bypasssize")
|
BYPASS_SIZE("imageonmap.bypasssize")
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
package fr.moribus.imageonmap.ui;
|
package fr.moribus.imageonmap.ui;
|
||||||
|
|
||||||
|
import fr.moribus.imageonmap.Permissions;
|
||||||
import fr.moribus.imageonmap.map.ImageMap;
|
import fr.moribus.imageonmap.map.ImageMap;
|
||||||
import fr.moribus.imageonmap.map.MapManager;
|
import fr.moribus.imageonmap.map.MapManager;
|
||||||
import fr.moribus.imageonmap.map.PosterMap;
|
import fr.moribus.imageonmap.map.PosterMap;
|
||||||
@ -285,6 +286,8 @@ public class MapItemManager implements Listener
|
|||||||
ItemStack item = frame.getItem();
|
ItemStack item = frame.getItem();
|
||||||
if (frame.getItem().getType() != Material.FILLED_MAP) return;
|
if (frame.getItem().getType() != Material.FILLED_MAP) return;
|
||||||
|
|
||||||
|
if (Permissions.REMOVE_SPLATTER_MAP.grantedTo(player))
|
||||||
|
{
|
||||||
if (player.isSneaking())
|
if (player.isSneaking())
|
||||||
{
|
{
|
||||||
PosterMap poster = SplatterMapManager.removeSplatterMap(frame,player);
|
PosterMap poster = SplatterMapManager.removeSplatterMap(frame,player);
|
||||||
@ -298,6 +301,7 @@ public class MapItemManager implements Listener
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!MapManager.managesMap(frame.getItem())) return;
|
if (!MapManager.managesMap(frame.getItem())) return;
|
||||||
|
|
||||||
|
@ -23,15 +23,16 @@ permissions:
|
|||||||
imageonmap.get: true
|
imageonmap.get: true
|
||||||
imageonmap.explore: true
|
imageonmap.explore: true
|
||||||
imageonmap.rename: true
|
imageonmap.rename: true
|
||||||
|
imageonmap.removesplattermap: true
|
||||||
imageonmap.delete: true
|
imageonmap.delete: true
|
||||||
imageonmap.bypasssize: false
|
imageonmap.bypasssize: false
|
||||||
|
|
||||||
imageonmap.userender:
|
imageonmap.userender:
|
||||||
description: "Allows you to use /tomap and related commands (/maptool getremaing). Alias of imageonmap.new."
|
description: "Allows you to use /tomap and related commands (/maptool getremaining). Alias of imageonmap.new."
|
||||||
default: true
|
default: true
|
||||||
|
|
||||||
imageonmap.new:
|
imageonmap.new:
|
||||||
description: "Allows you to use /tomap and related commands (/maptool getremaing)."
|
description: "Allows you to use /tomap and related commands (/maptool getremaining)."
|
||||||
default: true
|
default: true
|
||||||
|
|
||||||
imageonmap.list:
|
imageonmap.list:
|
||||||
@ -39,7 +40,7 @@ permissions:
|
|||||||
default: true
|
default: true
|
||||||
|
|
||||||
imageonmap.get:
|
imageonmap.get:
|
||||||
description: "Allows you to get a new map among the ones you already rendered, and related commands (/maptool getremaing)."
|
description: "Allows you to get a new map among the ones you already rendered, and related commands (/maptool getremaining)."
|
||||||
default: true
|
default: true
|
||||||
|
|
||||||
imageonmap.explore:
|
imageonmap.explore:
|
||||||
@ -54,6 +55,10 @@ permissions:
|
|||||||
description: "Allows you to delete a map you rendered in the past."
|
description: "Allows you to delete a map you rendered in the past."
|
||||||
default: true
|
default: true
|
||||||
|
|
||||||
|
imageonmap.removesplattermap:
|
||||||
|
description: "Allows you to remove a splatter map from a wall by sneaking and breaking a map."
|
||||||
|
default: true
|
||||||
|
|
||||||
imageonmap.administrative:
|
imageonmap.administrative:
|
||||||
description: "Allows you to perform administrative tasks (like /maptool migrate)."
|
description: "Allows you to perform administrative tasks (like /maptool migrate)."
|
||||||
default: op
|
default: op
|
||||||
|
Loading…
Reference in New Issue
Block a user