mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-08 03:49:32 +01:00
Merge pull request #388 from PseudoKnight/master
Fix protections for potted plants and undyed shulker boxes
This commit is contained in:
commit
7fb7d59856
@ -56,6 +56,7 @@ public final class Materials {
|
|||||||
private static Set<Material> shulkerBoxes = new HashSet<>();
|
private static Set<Material> shulkerBoxes = new HashSet<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
shulkerBoxes.add(Material.SHULKER_BOX);
|
||||||
shulkerBoxes.add(Material.WHITE_SHULKER_BOX);
|
shulkerBoxes.add(Material.WHITE_SHULKER_BOX);
|
||||||
shulkerBoxes.add(Material.ORANGE_SHULKER_BOX);
|
shulkerBoxes.add(Material.ORANGE_SHULKER_BOX);
|
||||||
shulkerBoxes.add(Material.MAGENTA_SHULKER_BOX);
|
shulkerBoxes.add(Material.MAGENTA_SHULKER_BOX);
|
||||||
@ -236,7 +237,6 @@ public final class Materials {
|
|||||||
MATERIAL_FLAGS.put(Material.COMMAND_BLOCK, MODIFIED_ON_RIGHT);
|
MATERIAL_FLAGS.put(Material.COMMAND_BLOCK, MODIFIED_ON_RIGHT);
|
||||||
MATERIAL_FLAGS.put(Material.BEACON, MODIFIED_ON_RIGHT);
|
MATERIAL_FLAGS.put(Material.BEACON, MODIFIED_ON_RIGHT);
|
||||||
MATERIAL_FLAGS.put(Material.COBBLESTONE_WALL, 0);
|
MATERIAL_FLAGS.put(Material.COBBLESTONE_WALL, 0);
|
||||||
MATERIAL_FLAGS.put(Material.FLOWER_POT, MODIFIED_ON_RIGHT);
|
|
||||||
MATERIAL_FLAGS.put(Material.ANVIL, MODIFIED_ON_RIGHT);
|
MATERIAL_FLAGS.put(Material.ANVIL, MODIFIED_ON_RIGHT);
|
||||||
MATERIAL_FLAGS.put(Material.TRAPPED_CHEST, MODIFIED_ON_RIGHT);
|
MATERIAL_FLAGS.put(Material.TRAPPED_CHEST, MODIFIED_ON_RIGHT);
|
||||||
MATERIAL_FLAGS.put(Material.HEAVY_WEIGHTED_PRESSURE_PLATE, 0);
|
MATERIAL_FLAGS.put(Material.HEAVY_WEIGHTED_PRESSURE_PLATE, 0);
|
||||||
@ -607,6 +607,9 @@ public final class Materials {
|
|||||||
for (Material button : Tag.BUTTONS.getValues()) {
|
for (Material button : Tag.BUTTONS.getValues()) {
|
||||||
MATERIAL_FLAGS.put(button, MODIFIED_ON_RIGHT);
|
MATERIAL_FLAGS.put(button, MODIFIED_ON_RIGHT);
|
||||||
}
|
}
|
||||||
|
for (Material pot : Tag.FLOWER_POTS.getValues()) {
|
||||||
|
MATERIAL_FLAGS.put(pot, MODIFIED_ON_RIGHT);
|
||||||
|
}
|
||||||
|
|
||||||
// Check for missing items/blocks
|
// Check for missing items/blocks
|
||||||
for (Material material : Material.values()) {
|
for (Material material : Material.values()) {
|
||||||
@ -1090,7 +1093,7 @@ public static boolean isItemAppliedToBlock(Material item, Material block) {
|
|||||||
public static boolean isConsideredBuildingIfUsed(Material type) {
|
public static boolean isConsideredBuildingIfUsed(Material type) {
|
||||||
return type == Material.REPEATER
|
return type == Material.REPEATER
|
||||||
|| type == Material.COMPARATOR
|
|| type == Material.COMPARATOR
|
||||||
|| type == Material.FLOWER_POT;
|
|| Tag.FLOWER_POTS.getValues().contains(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user