Permalink
Browse files

Merge pull request #388 from PseudoKnight/master

Fix protections for potted plants and undyed shulker boxes
  • Loading branch information...
me4502 committed Sep 26, 2018
2 parents 01dfebe + d3c4681 commit 7fb7d59856231b120d3df02c4bf6c51f00b87c22
Showing with 5 additions and 2 deletions.
  1. +5 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/util/Materials.java
@@ -56,6 +56,7 @@
private static Set<Material> shulkerBoxes = new HashSet<>();
static {
shulkerBoxes.add(Material.SHULKER_BOX);
shulkerBoxes.add(Material.WHITE_SHULKER_BOX);
shulkerBoxes.add(Material.ORANGE_SHULKER_BOX);
shulkerBoxes.add(Material.MAGENTA_SHULKER_BOX);
@@ -236,7 +237,6 @@
MATERIAL_FLAGS.put(Material.COMMAND_BLOCK, MODIFIED_ON_RIGHT);
MATERIAL_FLAGS.put(Material.BEACON, MODIFIED_ON_RIGHT);
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.TRAPPED_CHEST, MODIFIED_ON_RIGHT);
MATERIAL_FLAGS.put(Material.HEAVY_WEIGHTED_PRESSURE_PLATE, 0);
@@ -607,6 +607,9 @@
for (Material button : Tag.BUTTONS.getValues()) {
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
for (Material material : Material.values()) {
@@ -1090,7 +1093,7 @@ public static boolean isItemAppliedToBlock(Material item, Material block) {
public static boolean isConsideredBuildingIfUsed(Material type) {
return type == Material.REPEATER
|| type == Material.COMPARATOR
|| type == Material.FLOWER_POT;
|| Tag.FLOWER_POTS.getValues().contains(type);
}
/**

0 comments on commit 7fb7d59

Please sign in to comment.