From 7b508a987000f6dff7576dcbf62038b6240917a2 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Fri, 3 Oct 2014 12:52:46 +0200 Subject: [PATCH] Fix the cactus dupe --- .../java/com/massivecraft/factions/entity/MConf.java | 11 +++++++++++ .../factions/listeners/FactionsListenerMain.java | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/massivecraft/factions/entity/MConf.java b/src/main/java/com/massivecraft/factions/entity/MConf.java index 7babfac7..ae5d127c 100644 --- a/src/main/java/com/massivecraft/factions/entity/MConf.java +++ b/src/main/java/com/massivecraft/factions/entity/MConf.java @@ -324,6 +324,17 @@ public class MConf extends Entity Material.LAVA_BUCKET ); + // The duplication bug found in Spigot 1.8 protocol patch + // https://github.com/MassiveCraft/Factions/issues/693 + public Set materialsEditToolsDupeBug = MUtil.set( + Material.CHEST, + Material.SIGN_POST, + Material.TRAPPED_CHEST, + Material.SIGN, + Material.WOOD_DOOR, + Material.IRON_DOOR + ); + public Set materialsDoor = MUtil.set( Material.WOODEN_DOOR, Material.TRAP_DOOR, diff --git a/src/main/java/com/massivecraft/factions/listeners/FactionsListenerMain.java b/src/main/java/com/massivecraft/factions/listeners/FactionsListenerMain.java index 74319a2a..df13f116 100644 --- a/src/main/java/com/massivecraft/factions/listeners/FactionsListenerMain.java +++ b/src/main/java/com/massivecraft/factions/listeners/FactionsListenerMain.java @@ -977,7 +977,7 @@ public class FactionsListenerMain implements Listener // TODO: Possibly incorporate pain build... public static boolean playerCanUseItemHere(Player player, PS ps, Material material, boolean justCheck) { - if (!MConf.get().materialsEditTools.contains(material)) return true; + if ( ! MConf.get().materialsEditTools.contains(material) && ! MConf.get().materialsEditToolsDupeBug.contains(material)) return true; String name = player.getName(); if (MConf.get().playersWhoBypassAllProtection.contains(name)) return true;