Skip to content
Permalink
Browse files

Don't fail hard in 1.14.

  • Loading branch information...
wizjany committed May 14, 2019
1 parent aefebf3 commit e2e881de17773dd2dc7d4575aa1b111446d938ee
Showing with 10 additions and 3 deletions.
  1. +10 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/util/Materials.java
@@ -157,11 +157,9 @@
MATERIAL_FLAGS.put(Material.WHEAT, 0);
MATERIAL_FLAGS.put(Material.FARMLAND, 0);
MATERIAL_FLAGS.put(Material.FURNACE, MODIFIED_ON_RIGHT);
MATERIAL_FLAGS.put(Material.SIGN, 0);
MATERIAL_FLAGS.put(Material.LADDER, 0);
MATERIAL_FLAGS.put(Material.RAIL, 0);
MATERIAL_FLAGS.put(Material.COBBLESTONE_STAIRS, 0);
MATERIAL_FLAGS.put(Material.WALL_SIGN, 0);
MATERIAL_FLAGS.put(Material.LEVER, MODIFIED_ON_RIGHT);
MATERIAL_FLAGS.put(Material.STONE_PRESSURE_PLATE, 0);
MATERIAL_FLAGS.put(Material.REDSTONE_ORE, 0);
@@ -445,7 +443,6 @@
MATERIAL_FLAGS.put(Material.COD, 0);
MATERIAL_FLAGS.put(Material.COOKED_COD, 0);
MATERIAL_FLAGS.put(Material.INK_SAC, MODIFIES_BLOCKS);
MATERIAL_FLAGS.put(Material.DANDELION_YELLOW, MODIFIES_BLOCKS);
MATERIAL_FLAGS.put(Material.CYAN_DYE, MODIFIES_BLOCKS);
MATERIAL_FLAGS.put(Material.GRAY_DYE, MODIFIES_BLOCKS);
MATERIAL_FLAGS.put(Material.LIGHT_BLUE_DYE, MODIFIES_BLOCKS);
@@ -614,6 +611,16 @@
MATERIAL_FLAGS.put(pot, MODIFIED_ON_RIGHT);
}

try {
MATERIAL_FLAGS.put(Material.SIGN, 0);
MATERIAL_FLAGS.put(Material.WALL_SIGN, 0);
MATERIAL_FLAGS.put(Material.DANDELION_YELLOW, MODIFIES_BLOCKS);
MATERIAL_FLAGS.put(Material.ROSE_RED, MODIFIES_BLOCKS);
MATERIAL_FLAGS.put(MATERIAL.CACTUS_GREEN, MODIFIES_BLOCKS);
} catch (Exception ignored) { // missing fields in 1.14
}


// Check for missing items/blocks
for (Material material : Material.values()) {
// Add spawn eggs

0 comments on commit e2e881d

Please sign in to comment.
You can’t perform that action at this time.