mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-12-27 17:37:34 +01:00
Fixed logging and lookup issues after performing "/co reload" (fix #366)
This commit is contained in:
parent
7825f61e45
commit
5d90f25211
@ -7,8 +7,6 @@ import java.util.Set;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Tag;
|
||||
|
||||
import net.coreprotect.config.ConfigHandler;
|
||||
|
||||
public final class BlockGroup {
|
||||
|
||||
public static Set<Material> TRACK_ANY = new HashSet<>(Arrays.asList(Material.PISTON_HEAD, Material.LEVER, Material.BELL));
|
||||
@ -46,75 +44,73 @@ public final class BlockGroup {
|
||||
public static Set<Material> NON_ATTACHABLE = new HashSet<>(Arrays.asList(Material.AIR, Material.CAVE_AIR, Material.BARRIER, Material.CORNFLOWER, Material.LILY_OF_THE_VALLEY, Material.WITHER_ROSE, Material.SWEET_BERRY_BUSH, Material.OAK_SAPLING, Material.SPRUCE_SAPLING, Material.BIRCH_SAPLING, Material.JUNGLE_SAPLING, Material.ACACIA_SAPLING, Material.DARK_OAK_SAPLING, Material.WATER, Material.LAVA, Material.POWERED_RAIL, Material.DETECTOR_RAIL, Material.GRASS, Material.FERN, Material.DEAD_BUSH, Material.DANDELION, Material.POPPY, Material.BLUE_ORCHID, Material.ALLIUM, Material.AZURE_BLUET, Material.RED_TULIP, Material.ORANGE_TULIP, Material.WHITE_TULIP, Material.PINK_TULIP, Material.OXEYE_DAISY, Material.BROWN_MUSHROOM, Material.RED_MUSHROOM, Material.TORCH, Material.WALL_TORCH, Material.REDSTONE_WIRE, Material.LADDER, Material.RAIL, Material.LEVER, Material.REDSTONE_TORCH, Material.REDSTONE_WALL_TORCH, Material.SNOW, Material.SUGAR_CANE, Material.NETHER_PORTAL, Material.REPEATER, Material.KELP, Material.CHORUS_FLOWER, Material.CHORUS_PLANT));
|
||||
|
||||
public static void initialize() {
|
||||
if (!ConfigHandler.serverRunning) {
|
||||
TRACK_ANY.addAll(BUTTONS);
|
||||
TRACK_TOP.addAll(DOORS);
|
||||
TRACK_TOP.addAll(PRESSURE_PLATES);
|
||||
TRACK_TOP.addAll(Tag.CARPETS.getValues());
|
||||
TRACK_TOP_BOTTOM.addAll(LANTERNS);
|
||||
LIGHTABLES.addAll(CANDLES);
|
||||
INTERACT_BLOCKS.addAll(DOORS);
|
||||
INTERACT_BLOCKS.addAll(BUTTONS);
|
||||
SAFE_INTERACT_BLOCKS.addAll(DOORS);
|
||||
SAFE_INTERACT_BLOCKS.addAll(BUTTONS);
|
||||
NON_ATTACHABLE.addAll(BUTTONS);
|
||||
NON_ATTACHABLE.addAll(CANDLES);
|
||||
NON_ATTACHABLE.addAll(FIRE);
|
||||
UPDATE_STATE.addAll(LIGHTABLES);
|
||||
UPDATE_STATE.addAll(LANTERNS);
|
||||
TRACK_ANY.addAll(BUTTONS);
|
||||
TRACK_TOP.addAll(DOORS);
|
||||
TRACK_TOP.addAll(PRESSURE_PLATES);
|
||||
TRACK_TOP.addAll(Tag.CARPETS.getValues());
|
||||
TRACK_TOP_BOTTOM.addAll(LANTERNS);
|
||||
LIGHTABLES.addAll(CANDLES);
|
||||
INTERACT_BLOCKS.addAll(DOORS);
|
||||
INTERACT_BLOCKS.addAll(BUTTONS);
|
||||
SAFE_INTERACT_BLOCKS.addAll(DOORS);
|
||||
SAFE_INTERACT_BLOCKS.addAll(BUTTONS);
|
||||
NON_ATTACHABLE.addAll(BUTTONS);
|
||||
NON_ATTACHABLE.addAll(CANDLES);
|
||||
NON_ATTACHABLE.addAll(FIRE);
|
||||
UPDATE_STATE.addAll(LIGHTABLES);
|
||||
UPDATE_STATE.addAll(LANTERNS);
|
||||
|
||||
/* add all blocks that support vertical scanning */
|
||||
VERTICAL.addAll(VERTICAL_TOP_BOTTOM);
|
||||
VERTICAL.addAll(VERTICAL_TOP);
|
||||
VERTICAL.addAll(VERTICAL_BOTTOM);
|
||||
/* add all blocks that support vertical scanning */
|
||||
VERTICAL.addAll(VERTICAL_TOP_BOTTOM);
|
||||
VERTICAL.addAll(VERTICAL_TOP);
|
||||
VERTICAL.addAll(VERTICAL_BOTTOM);
|
||||
|
||||
/* Natural block group */
|
||||
/* https://minecraft.fandom.com/wiki/Tag */
|
||||
NATURAL_BLOCKS.addAll(Tag.BAMBOO_PLANTABLE_ON.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.VALID_SPAWN.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.SAND.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.LOGS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.LEAVES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.ICE.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.UNDERWATER_BONEMEALS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.CORAL_BLOCKS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.ENDERMAN_HOLDABLE.getValues());
|
||||
NATURAL_BLOCKS.addAll(SOUL_BLOCKS);
|
||||
NATURAL_BLOCKS.addAll(VINES);
|
||||
/* Natural block group */
|
||||
/* https://minecraft.fandom.com/wiki/Tag */
|
||||
NATURAL_BLOCKS.addAll(Tag.BAMBOO_PLANTABLE_ON.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.VALID_SPAWN.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.SAND.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.LOGS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.LEAVES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.ICE.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.UNDERWATER_BONEMEALS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.CORAL_BLOCKS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.ENDERMAN_HOLDABLE.getValues());
|
||||
NATURAL_BLOCKS.addAll(SOUL_BLOCKS);
|
||||
NATURAL_BLOCKS.addAll(VINES);
|
||||
|
||||
/*
|
||||
NATURAL_BLOCKS.addAll(Tag.BASE_STONE_OVERWORLD.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.BEACON_BASE_BLOCKS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.SOUL_FIRE_BASE_BLOCKS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.GEODE_INVALID_BLOCKS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.GUARDED_BY_PIGLINS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.INFINIBURN_END.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.INFINIBURN_NETHER.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.INFINIBURN_OVERWORLD.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.INSIDE_STEP_SOUND_BLOCKS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.DEEPSLATE_ORE_REPLACEABLES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.DIRT.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.STONE_ORE_REPLACEABLES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.COAL_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.COPPER_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.DIAMOND_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.EMERALD_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.GOLD_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.IRON_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.LAPIS_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.REDSTONE_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.FIRE.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.SNOW.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.BEEHIVES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.BEE_GROWABLES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.FLOWERS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.CROPS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.FEATURES_CANNOT_REPLACE.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.LUSH_GROUND_REPLACEABLE.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.MUSHROOM_GROW_BLOCK.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.NYLIUM.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.PORTALS.getValues());
|
||||
*/
|
||||
}
|
||||
/*
|
||||
NATURAL_BLOCKS.addAll(Tag.BASE_STONE_OVERWORLD.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.BEACON_BASE_BLOCKS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.SOUL_FIRE_BASE_BLOCKS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.GEODE_INVALID_BLOCKS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.GUARDED_BY_PIGLINS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.INFINIBURN_END.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.INFINIBURN_NETHER.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.INFINIBURN_OVERWORLD.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.INSIDE_STEP_SOUND_BLOCKS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.DEEPSLATE_ORE_REPLACEABLES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.DIRT.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.STONE_ORE_REPLACEABLES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.COAL_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.COPPER_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.DIAMOND_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.EMERALD_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.GOLD_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.IRON_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.LAPIS_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.REDSTONE_ORES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.FIRE.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.SNOW.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.BEEHIVES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.BEE_GROWABLES.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.FLOWERS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.CROPS.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.FEATURES_CANNOT_REPLACE.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.LUSH_GROUND_REPLACEABLE.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.MUSHROOM_GROW_BLOCK.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.NYLIUM.getValues());
|
||||
NATURAL_BLOCKS.addAll(Tag.PORTALS.getValues());
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user