diff --git a/src/main/java/pw/kaboom/extras/Main.java b/src/main/java/pw/kaboom/extras/Main.java index 9702c99..a29be43 100644 --- a/src/main/java/pw/kaboom/extras/Main.java +++ b/src/main/java/pw/kaboom/extras/Main.java @@ -5,9 +5,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.UUID; -import org.bukkit.Material; import org.bukkit.block.BlockFace; -import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; import org.bukkit.plugin.java.JavaPlugin; import com.destroystokyo.paper.profile.PlayerProfile; @@ -19,12 +17,6 @@ public class Main extends JavaPlugin { static HashMap commandMillisList = new HashMap<>(); static HashMap interactMillisList = new HashMap<>(); static HashSet consoleCommandBlacklist = new HashSet<>(); - static HashSet nonSolidBlockList = new HashSet<>(); - static HashSet nonSolidDoubleBlockList = new HashSet<>(); - static HashSet nonSolidSingularBlockList = new HashSet<>(); - static HashSet nonSolidWallMountedBlockList = new HashSet<>(); - static HashSet nonSolidWaterBlockList = new HashSet<>(); - static HashSet faces = new HashSet<>(); public void onLoad() { @@ -385,275 +377,6 @@ public class Main extends JavaPlugin { "vvbukkit" ); - Collections.addAll( - nonSolidDoubleBlockList, - Material.GRASS, - Material.SIGN, - Material.OAK_DOOR, - Material.IRON_DOOR, - Material.CACTUS, - Material.SUGAR_CANE, - Material.CAKE, - Material.DAYLIGHT_DETECTOR, - Material.BLACK_CARPET, - Material.BLUE_CARPET, - Material.BROWN_CARPET, - Material.CYAN_CARPET, - Material.GRAY_CARPET, - Material.GREEN_CARPET, - Material.LIGHT_BLUE_CARPET, - Material.LIGHT_GRAY_CARPET, - Material.LIME_CARPET, - Material.MAGENTA_CARPET, - Material.ORANGE_CARPET, - Material.PINK_CARPET, - Material.PURPLE_CARPET, - Material.RED_CARPET, - Material.WHITE_CARPET, - Material.YELLOW_CARPET, - Material.BLACK_BANNER, - Material.BLUE_BANNER, - Material.BROWN_BANNER, - Material.CYAN_BANNER, - Material.GRAY_BANNER, - Material.GREEN_BANNER, - Material.LIGHT_BLUE_BANNER, - Material.LIGHT_GRAY_BANNER, - Material.LIME_BANNER, - Material.MAGENTA_BANNER, - Material.ORANGE_BANNER, - Material.PINK_BANNER, - Material.PURPLE_BANNER, - Material.RED_BANNER, - Material.WHITE_BANNER, - Material.YELLOW_BANNER, - Material.SPRUCE_DOOR, - Material.BIRCH_DOOR, - Material.JUNGLE_DOOR, - Material.ACACIA_DOOR, - Material.DARK_OAK_DOOR, - Material.KELP_PLANT, - Material.TALL_SEAGRASS, - Material.TALL_GRASS, - Material.SUNFLOWER, - Material.LARGE_FERN, - Material.LILAC, - Material.ROSE_BUSH, - Material.PEONY - ); - - Collections.addAll( - nonSolidSingularBlockList, - Material.ACACIA_SAPLING, - Material.BIRCH_SAPLING, - Material.DARK_OAK_SAPLING, - Material.JUNGLE_SAPLING, - Material.OAK_SAPLING, - Material.SPRUCE_SAPLING, - Material.BLACK_BED, - Material.BLUE_BED, - Material.BROWN_BED, - Material.CYAN_BED, - Material.GRAY_BED, - Material.GREEN_BED, - Material.LIGHT_BLUE_BED, - Material.LIGHT_GRAY_BED, - Material.LIME_BED, - Material.MAGENTA_BED, - Material.ORANGE_BED, - Material.PINK_BED, - Material.PURPLE_BED, - Material.RED_BED, - Material.WHITE_BED, - Material.YELLOW_BED, - Material.POWERED_RAIL, - Material.DETECTOR_RAIL, - Material.DEAD_BUSH, - Material.AZURE_BLUET, - Material.ALLIUM, - Material.BLUE_ORCHID, - Material.DANDELION, - Material.FERN, - Material.ORANGE_TULIP, - Material.PINK_TULIP, - Material.POPPY, - Material.RED_TULIP, - Material.WHITE_TULIP, - Material.OXEYE_DAISY, - Material.BROWN_MUSHROOM, - Material.RED_MUSHROOM, - Material.WHEAT, - Material.RAIL, - Material.STONE_PRESSURE_PLATE, - Material.ACACIA_PRESSURE_PLATE, - Material.BIRCH_PRESSURE_PLATE, - Material.DARK_OAK_PRESSURE_PLATE, - Material.JUNGLE_PRESSURE_PLATE, - Material.OAK_PRESSURE_PLATE, - Material.SPRUCE_PRESSURE_PLATE, - Material.SNOW, - Material.REPEATER, - Material.PUMPKIN_STEM, - Material.MELON_STEM, - Material.LILY_PAD, - Material.FLOWER_POT, - Material.CARROTS, - Material.POTATOES, - Material.HEAVY_WEIGHTED_PRESSURE_PLATE, - Material.LIGHT_WEIGHTED_PRESSURE_PLATE, - Material.COMPARATOR, - Material.ACTIVATOR_RAIL, - Material.BEETROOTS, - Material.NETHER_WART_BLOCK, - Material.SEAGRASS, - Material.BRAIN_CORAL, - Material.BUBBLE_CORAL, - Material.DEAD_BRAIN_CORAL, - Material.DEAD_BUBBLE_CORAL, - Material.DEAD_FIRE_CORAL, - Material.DEAD_HORN_CORAL, - Material.DEAD_TUBE_CORAL, - Material.FIRE_CORAL, - Material.HORN_CORAL, - Material.TUBE_CORAL, - Material.SEA_PICKLE, - Material.KELP, - Material.POTTED_ACACIA_SAPLING, - Material.POTTED_ALLIUM, - Material.POTTED_AZURE_BLUET, - Material.POTTED_BIRCH_SAPLING, - Material.POTTED_BLUE_ORCHID, - Material.POTTED_BROWN_MUSHROOM, - Material.POTTED_CACTUS, - Material.POTTED_DANDELION, - Material.POTTED_DARK_OAK_SAPLING, - Material.POTTED_DEAD_BUSH, - Material.POTTED_FERN, - Material.POTTED_JUNGLE_SAPLING, - Material.POTTED_OAK_SAPLING, - Material.POTTED_ORANGE_TULIP, - Material.POTTED_OXEYE_DAISY, - Material.POTTED_PINK_TULIP, - Material.POTTED_POPPY, - Material.POTTED_RED_MUSHROOM, - Material.POTTED_RED_TULIP, - Material.POTTED_SPRUCE_SAPLING, - Material.POTTED_WHITE_TULIP - ); - - Collections.addAll( - nonSolidWallMountedBlockList, - Material.FIRE, - Material.TORCH, - Material.WALL_TORCH, - Material.LADDER, - Material.WALL_SIGN, - Material.LEVER, - Material.REDSTONE_WIRE, - Material.REDSTONE_TORCH, - Material.REDSTONE_WALL_TORCH, - Material.STONE_BUTTON, - Material.ACACIA_TRAPDOOR, - Material.BIRCH_TRAPDOOR, - Material.DARK_OAK_TRAPDOOR, - Material.JUNGLE_TRAPDOOR, - Material.OAK_TRAPDOOR, - Material.SPRUCE_TRAPDOOR, - Material.VINE, - Material.COCOA, - Material.TRIPWIRE_HOOK, - Material.ACACIA_BUTTON, - Material.BIRCH_BUTTON, - Material.DARK_OAK_BUTTON, - Material.JUNGLE_BUTTON, - Material.OAK_BUTTON, - Material.SPRUCE_BUTTON, - Material.IRON_TRAPDOOR, - Material.BLACK_WALL_BANNER, - Material.BLUE_WALL_BANNER, - Material.BROWN_WALL_BANNER, - Material.CYAN_WALL_BANNER, - Material.GRAY_WALL_BANNER, - Material.GREEN_WALL_BANNER, - Material.LIGHT_BLUE_WALL_BANNER, - Material.LIGHT_GRAY_WALL_BANNER, - Material.LIME_WALL_BANNER, - Material.MAGENTA_WALL_BANNER, - Material.ORANGE_WALL_BANNER, - Material.PINK_WALL_BANNER, - Material.PURPLE_WALL_BANNER, - Material.RED_WALL_BANNER, - Material.WHITE_WALL_BANNER, - Material.YELLOW_WALL_BANNER, - Material.NETHER_PORTAL, - Material.END_PORTAL, - Material.BRAIN_CORAL_FAN, - Material.BRAIN_CORAL_WALL_FAN, - Material.BUBBLE_CORAL_FAN, - Material.BUBBLE_CORAL_WALL_FAN, - Material.DEAD_BRAIN_CORAL_FAN, - Material.DEAD_BRAIN_CORAL_WALL_FAN, - Material.DEAD_BUBBLE_CORAL_FAN, - Material.DEAD_BUBBLE_CORAL_WALL_FAN, - Material.DEAD_FIRE_CORAL_FAN, - Material.DEAD_FIRE_CORAL_WALL_FAN, - Material.DEAD_HORN_CORAL_FAN, - Material.DEAD_HORN_CORAL_WALL_FAN, - Material.DEAD_TUBE_CORAL_FAN, - Material.DEAD_TUBE_CORAL_WALL_FAN, - Material.FIRE_CORAL_FAN, - Material.FIRE_CORAL_WALL_FAN, - Material.HORN_CORAL_FAN, - Material.HORN_CORAL_WALL_FAN, - Material.TUBE_CORAL_FAN, - Material.TUBE_CORAL_WALL_FAN, - Material.CHORUS_FLOWER, - Material.CHORUS_PLANT - ); - - Collections.addAll( - nonSolidWaterBlockList, - Material.BRAIN_CORAL_FAN, - Material.BRAIN_CORAL_WALL_FAN, - Material.BUBBLE_CORAL_FAN, - Material.BUBBLE_CORAL_WALL_FAN, - Material.DEAD_BRAIN_CORAL_FAN, - Material.DEAD_BRAIN_CORAL_WALL_FAN, - Material.DEAD_BUBBLE_CORAL_FAN, - Material.DEAD_BUBBLE_CORAL_WALL_FAN, - Material.DEAD_FIRE_CORAL_FAN, - Material.DEAD_FIRE_CORAL_WALL_FAN, - Material.DEAD_HORN_CORAL_FAN, - Material.DEAD_HORN_CORAL_WALL_FAN, - Material.DEAD_TUBE_CORAL_FAN, - Material.DEAD_TUBE_CORAL_WALL_FAN, - Material.FIRE_CORAL_FAN, - Material.FIRE_CORAL_WALL_FAN, - Material.HORN_CORAL_FAN, - Material.HORN_CORAL_WALL_FAN, - Material.TUBE_CORAL_FAN, - Material.TUBE_CORAL_WALL_FAN, - Material.SEAGRASS, - Material.BRAIN_CORAL, - Material.BUBBLE_CORAL, - Material.DEAD_BRAIN_CORAL, - Material.DEAD_BUBBLE_CORAL, - Material.DEAD_FIRE_CORAL, - Material.DEAD_HORN_CORAL, - Material.DEAD_TUBE_CORAL, - Material.FIRE_CORAL, - Material.HORN_CORAL, - Material.TUBE_CORAL, - Material.SEA_PICKLE, - Material.KELP, - Material.KELP_PLANT, - Material.TALL_SEAGRASS - ); - - this.nonSolidBlockList.addAll(nonSolidDoubleBlockList); - this.nonSolidBlockList.addAll(nonSolidSingularBlockList); - this.nonSolidBlockList.addAll(nonSolidWallMountedBlockList); - Collections.addAll( faces, BlockFace.NORTH, diff --git a/src/main/java/pw/kaboom/extras/modules/block/BlockPhysics.java b/src/main/java/pw/kaboom/extras/modules/block/BlockPhysics.java index e3d4313..35c505a 100644 --- a/src/main/java/pw/kaboom/extras/modules/block/BlockPhysics.java +++ b/src/main/java/pw/kaboom/extras/modules/block/BlockPhysics.java @@ -1,22 +1,14 @@ package pw.kaboom.extras; -import java.util.ArrayList; - import org.bukkit.Bukkit; -import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.Nameable; -import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; import org.bukkit.block.BlockState; import org.bukkit.block.CommandBlock; -import org.bukkit.block.data.Levelled; - import org.bukkit.entity.EntityType; -import org.bukkit.entity.TNTPrimed; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener;