mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-23 09:37:51 +01:00
Added new flag respawn-anchors similar to block respawn anchor usage
This commit is contained in:
parent
0fa92d4836
commit
8722322cd8
@ -261,11 +261,16 @@ public void onUseBlock(final UseBlockEvent event) {
|
||||
canUse = query.testBuild(BukkitAdapter.adapt(target), associable, combine(event, Flags.CHEST_ACCESS));
|
||||
what = "open that";
|
||||
|
||||
/* Beds or Respawn Anchor */
|
||||
} else if (Materials.isBed(type) || type == Material.RESPAWN_ANCHOR) {
|
||||
/* Beds */
|
||||
} else if (Materials.isBed(type)) {
|
||||
canUse = query.testBuild(BukkitAdapter.adapt(target), associable, combine(event, Flags.INTERACT, Flags.SLEEP));
|
||||
what = "sleep";
|
||||
|
||||
/* Respawn Anchors */
|
||||
} else if(type == Material.RESPAWN_ANCHOR) {
|
||||
canUse = query.testBuild(BukkitAdapter.adapt(target), associable, combine(event, Flags.INTERACT, Flags.RESPAWN_ANCHORS));
|
||||
what = "use anchors";
|
||||
|
||||
/* TNT */
|
||||
} else if (type == Material.TNT) {
|
||||
canUse = query.testBuild(BukkitAdapter.adapt(target), associable, combine(event, Flags.INTERACT, Flags.TNT));
|
||||
|
@ -60,6 +60,7 @@ public final class Flags {
|
||||
public static final StateFlag DAMAGE_ANIMALS = register(new StateFlag("damage-animals", false));
|
||||
public static final StateFlag PVP = register(new StateFlag("pvp", false));
|
||||
public static final StateFlag SLEEP = register(new StateFlag("sleep", false));
|
||||
public static final StateFlag RESPAWN_ANCHORS = register(new StateFlag("respawn-anchors", false));
|
||||
public static final StateFlag TNT = register(new StateFlag("tnt", false));
|
||||
public static final StateFlag CHEST_ACCESS = register(new StateFlag("chest-access", false));
|
||||
public static final StateFlag PLACE_VEHICLE = register(new StateFlag("vehicle-place", false));
|
||||
|
Loading…
Reference in New Issue
Block a user