|
28 | 28 | import com.plotsquared.core.plot.flag.implementations.MiscInteractFlag;
|
29 | 29 | import com.plotsquared.core.plot.flag.implementations.SculkSensorInteractFlag;
|
30 | 30 | import com.plotsquared.core.util.PlotFlagUtil;
|
31 |
| -import org.bukkit.Material; |
32 | 31 | import org.bukkit.block.Block;
|
33 | 32 | import org.bukkit.entity.Entity;
|
34 | 33 | import org.bukkit.entity.Item;
|
|
42 | 41 |
|
43 | 42 | import java.util.List;
|
44 | 43 | import java.util.Objects;
|
45 |
| -import java.util.Set; |
46 | 44 | import java.util.UUID;
|
47 | 45 |
|
48 | 46 | @SuppressWarnings("unused")
|
49 | 47 | public class BlockEventListener117 implements Listener {
|
50 | 48 |
|
51 |
| - private static final Set<Material> COPPER_OXIDIZING = Set.of( |
52 |
| - Material.COPPER_BLOCK, |
53 |
| - Material.EXPOSED_COPPER, |
54 |
| - Material.WEATHERED_COPPER, |
55 |
| - Material.OXIDIZED_COPPER, |
56 |
| - Material.CUT_COPPER, |
57 |
| - Material.EXPOSED_CUT_COPPER, |
58 |
| - Material.WEATHERED_CUT_COPPER, |
59 |
| - Material.OXIDIZED_CUT_COPPER, |
60 |
| - Material.CUT_COPPER_STAIRS, |
61 |
| - Material.EXPOSED_CUT_COPPER_STAIRS, |
62 |
| - Material.WEATHERED_CUT_COPPER_STAIRS, |
63 |
| - Material.OXIDIZED_CUT_COPPER_STAIRS, |
64 |
| - Material.CUT_COPPER_SLAB, |
65 |
| - Material.EXPOSED_CUT_COPPER_SLAB, |
66 |
| - Material.WEATHERED_CUT_COPPER_SLAB, |
67 |
| - Material.OXIDIZED_CUT_COPPER_SLAB |
68 |
| - ); |
69 |
| - |
70 | 49 | @Inject
|
71 | 50 | public BlockEventListener117() {
|
72 | 51 | }
|
@@ -184,7 +163,7 @@ public void onBlockForm(BlockFormEvent event) {
|
184 | 163 | if (plot == null) {
|
185 | 164 | return;
|
186 | 165 | }
|
187 |
| - if (COPPER_OXIDIZING.contains(event.getNewState().getType())) { |
| 166 | + if (event.getNewState().getType().name().contains("COPPER")) { |
188 | 167 | if (!plot.getFlag(CopperOxideFlag.class)) {
|
189 | 168 | plot.debug("Copper could not oxide because copper-oxide = false");
|
190 | 169 | event.setCancelled(true);
|
|
0 commit comments