From 3d7d363e301f2f4200b97da44bbd4aac7398470e Mon Sep 17 00:00:00 2001 From: ZeroEpoch1969 <13510767+ZeroEpoch1969@users.noreply.github.com> Date: Sun, 27 Jan 2019 18:49:07 -0700 Subject: [PATCH] yay more things --- TotalFreedomMod.iml | 39 +++++--- pom.xml | 8 +- .../blocking/BlockBlocker.java | 4 +- .../blocking/EventBlocker.java | 4 +- .../bridge/WorldGuardBridge.java | 19 ++-- .../command/Command_mobpurge.java | 46 ++++++++- .../command/Command_purgeall.java | 2 +- .../totalfreedommod/command/Command_ro.java | 4 +- .../command/Command_saconfig.java | 8 ++ .../command/Command_wiperegions.java | 14 ++- .../command/FreedomCommand.java | 14 +++ .../totalfreedommod/fun/Jumppads.java | 14 +-- .../totalfreedommod/fun/Trailer.java | 4 +- .../httpd/module/Module_schematic.java | 6 +- .../totalfreedommod/rank/RankManager.java | 12 +-- .../totalfreedommod/util/Groups.java | 94 +++++++++++++++++++ .../totalfreedommod/util/MaterialGroup.java | 44 --------- 17 files changed, 233 insertions(+), 103 deletions(-) create mode 100644 src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java delete mode 100644 src/main/java/me/totalfreedom/totalfreedommod/util/MaterialGroup.java diff --git a/TotalFreedomMod.iml b/TotalFreedomMod.iml index e2f46a38..7766ed47 100644 --- a/TotalFreedomMod.iml +++ b/TotalFreedomMod.iml @@ -16,13 +16,13 @@ - - - - - - - + + + + + + + @@ -32,12 +32,12 @@ - - + + - + @@ -48,7 +48,7 @@ - + @@ -59,9 +59,22 @@ - + - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index eb147032..2d74ab71 100644 --- a/pom.xml +++ b/pom.xml @@ -130,7 +130,7 @@ com.github.TFPatches TF-WorldEdit - c0f82ebeff + 0909dc1972 provided @@ -163,9 +163,9 @@ - com.sk89q.worldguard - worldguard-legacy - 6.2 + com.github.TFPatches + TF-WorldGuard + 50fd4cb470 provided diff --git a/src/main/java/me/totalfreedom/totalfreedommod/blocking/BlockBlocker.java b/src/main/java/me/totalfreedom/totalfreedommod/blocking/BlockBlocker.java index d86bb27b..9ba68d92 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/blocking/BlockBlocker.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/blocking/BlockBlocker.java @@ -5,7 +5,7 @@ import me.totalfreedom.totalfreedommod.TotalFreedomMod; import me.totalfreedom.totalfreedommod.config.ConfigEntry; import me.totalfreedom.totalfreedommod.util.FLog; import me.totalfreedom.totalfreedommod.util.FUtil; -import me.totalfreedom.totalfreedommod.util.MaterialGroup; +import me.totalfreedom.totalfreedommod.util.Groups; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.block.Block; @@ -107,7 +107,7 @@ public class BlockBlocker extends FreedomService public void onShulkerBoxPlace(BlockPlaceEvent event) { Block block = event.getBlock(); - if (MaterialGroup.SHULKER_BOXES.contains(event.getBlock().getType())) + if (Groups.SHULKER_BOXES.contains(event.getBlock().getType())) { ShulkerBox shulkerBox = (ShulkerBox)block.getState(); boolean empty = true; diff --git a/src/main/java/me/totalfreedom/totalfreedommod/blocking/EventBlocker.java b/src/main/java/me/totalfreedom/totalfreedommod/blocking/EventBlocker.java index b99d8e67..60a0bafa 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/blocking/EventBlocker.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/blocking/EventBlocker.java @@ -3,7 +3,7 @@ package me.totalfreedom.totalfreedommod.blocking; import me.totalfreedom.totalfreedommod.FreedomService; import me.totalfreedom.totalfreedommod.TotalFreedomMod; import me.totalfreedom.totalfreedommod.config.ConfigEntry; -import me.totalfreedom.totalfreedommod.util.MaterialGroup; +import me.totalfreedom.totalfreedommod.util.Groups; import org.bukkit.attribute.Attribute; import org.bukkit.attribute.AttributeModifier; import org.bukkit.block.ShulkerBox; @@ -217,7 +217,7 @@ public class EventBlocker extends FreedomService public void onBlockDispense(BlockDispenseEvent event) { ItemStack item = event.getItem(); - if (MaterialGroup.SHULKER_BOXES.contains(item.getType())) + if (Groups.SHULKER_BOXES.contains(item.getType())) { BlockStateMeta blockStateMeta = (BlockStateMeta)item.getItemMeta(); ShulkerBox shulkerBox = (ShulkerBox)blockStateMeta.getBlockState(); diff --git a/src/main/java/me/totalfreedom/totalfreedommod/bridge/WorldGuardBridge.java b/src/main/java/me/totalfreedom/totalfreedommod/bridge/WorldGuardBridge.java index 42d4f6a0..5ea227a7 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/bridge/WorldGuardBridge.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/bridge/WorldGuardBridge.java @@ -1,7 +1,8 @@ package me.totalfreedom.totalfreedommod.bridge; -import com.sk89q.worldguard.bukkit.RegionContainer; +import com.sk89q.worldguard.bukkit.BukkitRegionContainer; import com.sk89q.worldguard.bukkit.WorldGuardPlugin; +import com.sk89q.worldguard.WorldGuard; import com.sk89q.worldguard.protection.managers.RegionManager; import com.sk89q.worldguard.protection.regions.ProtectedRegion; import java.util.Map; @@ -52,20 +53,20 @@ public class WorldGuardBridge extends FreedomService return worldGuardPlugin; } - public Boolean wipeRegions(World world) + public int wipeRegions(World world) { - RegionContainer container = getWorldGuardPlugin().getRegionContainer(); - RegionManager rm = container.get(world); - if (rm != null) + int count = 0; + RegionManager regionManager = getWorldGuardPlugin().getRegionManager(world); + if (regionManager != null) { - Map regions = rm.getRegions(); + Map regions = regionManager.getRegions(); for (ProtectedRegion region : regions.values()) { - rm.removeRegion(region.getId()); + regionManager.removeRegion(region.getId()); + count++; } - return true; } - return false; + return count; } public boolean isEnabled() diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mobpurge.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mobpurge.java index 3be5ae65..2e7add6a 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mobpurge.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mobpurge.java @@ -1,8 +1,12 @@ package me.totalfreedom.totalfreedommod.command; +import com.sk89q.worldedit.blocks.metadata.MobType; import me.totalfreedom.totalfreedommod.rank.Rank; import me.totalfreedom.totalfreedommod.util.FUtil; +import me.totalfreedom.totalfreedommod.util.Groups; +import org.apache.commons.lang.WordUtils; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.World; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -10,32 +14,64 @@ import org.bukkit.entity.Ambient; import org.bukkit.entity.Creature; import org.bukkit.entity.EnderDragon; import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; import org.bukkit.entity.Ghast; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Slime; @CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH) -@CommandParameters(description = "Purge all mobs in all worlds.", usage = "/", aliases = "mp") +@CommandParameters(description = "Purge all mobs in all worlds.", usage = "/ [name]", aliases = "mp") public class Command_mobpurge extends FreedomCommand { @Override public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { - FUtil.adminAction(sender.getName(), "Purging all mobs", true); - msg(purgeMobs() + " mobs removed."); + EntityType type = null; + String mobName = null; + if (args.length > 0) + { + try + { + type = EntityType.valueOf(args[0].toUpperCase()); + } + catch (Exception e) + { + msg(args[0] + " is not a valid mob type.", ChatColor.RED); + return true; + } + + if (!Groups.MOB_TYPES.contains(type)) + { + msg(WordUtils.capitalizeFully(type.name().replace("_", " ")) + " is an entity, however it is not a mob.", ChatColor.RED); + return true; + } + } + + if (type != null) + { + mobName = WordUtils.capitalizeFully(type.name().replace("_", " ")); + } + + FUtil.adminAction(sender.getName(), "Purging all " + (type != null ? mobName + "s" : "mobs"), true); + msg(purgeMobs(type) + " " + (type != null ? mobName : "mob") + "s removed."); return true; } - public static int purgeMobs() + public static int purgeMobs(EntityType type) { int removed = 0; for (World world : Bukkit.getWorlds()) { for (Entity ent : world.getLivingEntities()) { - if (ent instanceof Creature || ent instanceof Ghast || ent instanceof Slime || ent instanceof EnderDragon || ent instanceof Ambient) + if (ent instanceof LivingEntity && !(ent instanceof Player)) { + if (type != null && !ent.getType().equals(type)) + { + continue; + } ent.remove(); removed++; } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_purgeall.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_purgeall.java index c2176bfa..cc4df7c6 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_purgeall.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_purgeall.java @@ -66,7 +66,7 @@ public class Command_purgeall extends FreedomCommand plugin.fm.setGlobalFreeze(false); // Remove all mobs - Command_mobpurge.purgeMobs(); + Command_mobpurge.purgeMobs(null); return true; } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ro.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ro.java index db00338c..adeb6e8e 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ro.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ro.java @@ -4,7 +4,7 @@ import java.util.ArrayList; import java.util.List; import me.totalfreedom.totalfreedommod.rank.Rank; import me.totalfreedom.totalfreedommod.util.FUtil; -import me.totalfreedom.totalfreedommod.util.MaterialGroup; +import me.totalfreedom.totalfreedommod.util.Groups; import org.apache.commons.lang3.StringUtils; import org.bukkit.ChatColor; import org.bukkit.Location; @@ -32,7 +32,7 @@ public class Command_ro extends FreedomCommand String names = null; if (args[0].equalsIgnoreCase("shulker_boxes") || args[0].equalsIgnoreCase("shulkers")) { - materials.addAll(MaterialGroup.SHULKER_BOXES); + materials.addAll(Groups.SHULKER_BOXES); names = "shulker boxes"; } else diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_saconfig.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_saconfig.java index 78522fc9..0f88d3e6 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_saconfig.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_saconfig.java @@ -1,6 +1,8 @@ package me.totalfreedom.totalfreedommod.command; +import java.util.Arrays; import java.util.Date; +import java.util.List; import me.totalfreedom.totalfreedommod.admin.Admin; import me.totalfreedom.totalfreedommod.masterbuilder.MasterBuilder; import me.totalfreedom.totalfreedommod.player.FPlayer; @@ -301,4 +303,10 @@ public class Command_saconfig extends FreedomCommand } } } + + /*@Override + public List tabComplete(CommandSender sender, Command command, String alias, String[] args) + { + return Arrays.asList("list", "clean", "reload", "setrank", "add", "remove", "info"); + }*/ } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_wiperegions.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_wiperegions.java index a4bb911a..0cb3a15f 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_wiperegions.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_wiperegions.java @@ -8,7 +8,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.TELNET_ADMIN, source = SourceType.BOTH) +@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE) @CommandParameters(description = "Wipe all WorldGuard regions for a specified world.", usage = "/ ") public class Command_wiperegions extends FreedomCommand { @@ -29,21 +29,25 @@ public class Command_wiperegions extends FreedomCommand World world = server.getWorld(args[0]); if (world == null) { - msg("World : \"" + args[0] + "\" not found."); + msg("There is no world named \"" + args[0] + "\"", ChatColor.RED); return true; } if (world.equals(plugin.wm.adminworld.getWorld())) { checkRank(Rank.SENIOR_ADMIN); } - if (plugin.wgb.wipeRegions(world)) + + int regionsWiped = plugin.wgb.wipeRegions(world); + + if (regionsWiped != 0) { - FUtil.adminAction(sender.getName(), "Wiping regions for world: " + world.getName(), true); + FUtil.adminAction(sender.getName(), "Wiped all regions in " + world.getName(), true); + msg("Wiped " + regionsWiped + " regions in " + world.getName()); return true; } else { - msg(ChatColor.RED + "No regions were found in: \"" + world.getName() + "\"."); + msg(ChatColor.RED + "No regions were found in \"" + world.getName() + "\""); return true; } } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/FreedomCommand.java b/src/main/java/me/totalfreedom/totalfreedommod/command/FreedomCommand.java index 3996904e..5e304115 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/FreedomCommand.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/FreedomCommand.java @@ -1,5 +1,11 @@ package me.totalfreedom.totalfreedommod.command; +import com.earth2me.essentials.CommandSource; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; import lombok.Getter; import me.totalfreedom.totalfreedommod.TotalFreedomMod; import me.totalfreedom.totalfreedommod.admin.Admin; @@ -10,10 +16,12 @@ import me.totalfreedom.totalfreedommod.util.FUtil; import net.pravian.aero.command.AbstractCommandBase; import net.pravian.aero.util.Players; import org.bukkit.ChatColor; +import org.bukkit.Server; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.PluginCommand; import org.bukkit.entity.Player; +import org.bukkit.util.StringUtil; public abstract class FreedomCommand extends AbstractCommandBase { @@ -68,6 +76,12 @@ public abstract class FreedomCommand extends AbstractCommandBase tabComplete(CommandSender sender, Command command, String alias, String[] args) + { + return Arrays.asList("x", "d"); + }*/ + protected void checkConsole() { if (!isConsole()) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/fun/Jumppads.java b/src/main/java/me/totalfreedom/totalfreedommod/fun/Jumppads.java index 9d3c816c..7794e594 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/fun/Jumppads.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/fun/Jumppads.java @@ -6,7 +6,7 @@ import lombok.Getter; import lombok.Setter; import me.totalfreedom.totalfreedommod.FreedomService; import me.totalfreedom.totalfreedommod.TotalFreedomMod; -import me.totalfreedom.totalfreedommod.util.MaterialGroup; +import me.totalfreedom.totalfreedommod.util.Groups; import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -63,7 +63,7 @@ public class Jumppads extends FreedomService { canPush = true; } - if (MaterialGroup.WOOL_COLORS.contains(block.getRelative(0, -1, 0).getType())) + if (Groups.WOOL_COLORS.contains(block.getRelative(0, -1, 0).getType())) { if (canPush) { @@ -79,29 +79,29 @@ public class Jumppads extends FreedomService } else { - if (MaterialGroup.WOOL_COLORS.contains(block.getRelative(0, -1, 0).getType())) + if (Groups.WOOL_COLORS.contains(block.getRelative(0, -1, 0).getType())) { velocity.add(new Vector(0.0, strength, 0.0)); } if (mode == JumpPadMode.NORMAL_AND_SIDEWAYS) { - if (MaterialGroup.WOOL_COLORS.contains(block.getRelative(1, 0, 0).getType())) + if (Groups.WOOL_COLORS.contains(block.getRelative(1, 0, 0).getType())) { velocity.add(new Vector(-DAMPING_COEFFICIENT * strength, 0.0, 0.0)); } - if (MaterialGroup.WOOL_COLORS.contains(block.getRelative(-1, 0, 0).getType())) + if (Groups.WOOL_COLORS.contains(block.getRelative(-1, 0, 0).getType())) { velocity.add(new Vector(DAMPING_COEFFICIENT * strength, 0.0, 0.0)); } - if (MaterialGroup.WOOL_COLORS.contains(block.getRelative(0, 0, 1).getType())) + if (Groups.WOOL_COLORS.contains(block.getRelative(0, 0, 1).getType())) { velocity.add(new Vector(0.0, 0.0, -DAMPING_COEFFICIENT * strength)); } - if (MaterialGroup.WOOL_COLORS.contains(block.getRelative(0, 0, -1).getType())) + if (Groups.WOOL_COLORS.contains(block.getRelative(0, 0, -1).getType())) { velocity.add(new Vector(0.0, 0.0, DAMPING_COEFFICIENT * strength)); } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/fun/Trailer.java b/src/main/java/me/totalfreedom/totalfreedommod/fun/Trailer.java index 24dc68a5..bf480e7c 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/fun/Trailer.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/fun/Trailer.java @@ -5,7 +5,7 @@ import java.util.Random; import java.util.Set; import me.totalfreedom.totalfreedommod.FreedomService; import me.totalfreedom.totalfreedommod.TotalFreedomMod; -import me.totalfreedom.totalfreedommod.util.MaterialGroup; +import me.totalfreedom.totalfreedommod.util.Groups; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; @@ -65,7 +65,7 @@ public class Trailer extends FreedomService return; } - fromBlock.setType(MaterialGroup.WOOL_COLORS.get(random.nextInt(MaterialGroup.WOOL_COLORS.size()))); + fromBlock.setType(Groups.WOOL_COLORS.get(random.nextInt(Groups.WOOL_COLORS.size()))); BlockData data = fromBlock.getBlockData(); Material material = Material.getMaterial(String.valueOf(fromBlock.getType())); for (int x = -1; x <= 1; x++) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_schematic.java b/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_schematic.java index 6a2f0e25..7df40767 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_schematic.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_schematic.java @@ -27,7 +27,7 @@ public class Module_schematic extends HTTPDModule private static final File SCHEMATIC_FOLDER = new File("./plugins/WorldEdit/schematics/"); private static final String REQUEST_FORM_FILE_ELEMENT_NAME = "schematicFile"; - private static final Pattern SCHEMATIC_FILENAME_LC = Pattern.compile("^[a-z0-9_'!,\\-]{1,30}\\.schematic$"); + private static final Pattern SCHEMATIC_FILENAME_LC = Pattern.compile("^[a-z0-9_'!,\\-]*\\.(schem|schematic)$"); private static final String[] SCHEMATIC_FILTER = new String[] { "schematic" @@ -89,6 +89,10 @@ public class Module_schematic extends HTTPDModule { schematicsFormatted.add("
  • " + filename + "
  • "); } + else if (filename.length() > 254) + { + schematicsFormatted.add("
  • " + filename + " - (Filename too long, can't download)
  • "); + } else { schematicsFormatted.add("
  • " + filename + " - (Illegal filename, can't download)
  • "); diff --git a/src/main/java/me/totalfreedom/totalfreedommod/rank/RankManager.java b/src/main/java/me/totalfreedom/totalfreedommod/rank/RankManager.java index 0a6548b1..c816809a 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/rank/RankManager.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/rank/RankManager.java @@ -50,10 +50,10 @@ public class RankManager extends FreedomService return Rank.IMPOSTOR; } - // Master builders show up if they are not admins - if (plugin.mbl.isMasterBuilder(player) && !plugin.al.isAdmin(player)) + // If the player's an owner, display that + if (ConfigEntry.SERVER_OWNERS.getList().contains(player.getName())) { - return Title.MASTER_BUILDER; + return Title.OWNER; } // Developers always show up @@ -67,10 +67,10 @@ public class RankManager extends FreedomService return Title.EXECUTIVE; } - // If the player's an owner, display that - if (ConfigEntry.SERVER_OWNERS.getList().contains(player.getName())) + // Master builders show up if they are not admins + if (plugin.mbl.isMasterBuilder(player) && !plugin.al.isAdmin(player)) { - return Title.OWNER; + return Title.MASTER_BUILDER; } return getRank(player); diff --git a/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java b/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java new file mode 100644 index 00000000..4b44bfa0 --- /dev/null +++ b/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java @@ -0,0 +1,94 @@ +package me.totalfreedom.totalfreedommod.util; + +import java.util.Arrays; +import java.util.List; +import org.bukkit.Material; +import org.bukkit.entity.EntityType; + +public class Groups +{ + public static final List WOOL_COLORS = Arrays.asList( + Material.WHITE_WOOL, + Material.RED_WOOL, + Material.ORANGE_WOOL, + Material.YELLOW_WOOL, + Material.GREEN_WOOL, + Material.LIME_WOOL, + Material.LIGHT_BLUE_WOOL, + Material.CYAN_WOOL, + Material.BLUE_WOOL, + Material.PURPLE_WOOL, + Material.MAGENTA_WOOL, + Material.PINK_WOOL, + Material.BROWN_WOOL, + Material.GRAY_WOOL, + Material.LIGHT_GRAY_WOOL, + Material.BLACK_WOOL); + public static final List SHULKER_BOXES = Arrays.asList( + Material.SHULKER_BOX, + Material.WHITE_SHULKER_BOX, + Material.RED_SHULKER_BOX, + Material.ORANGE_SHULKER_BOX, + Material.YELLOW_SHULKER_BOX, + Material.GREEN_SHULKER_BOX, + Material.LIME_SHULKER_BOX, + Material.LIGHT_BLUE_SHULKER_BOX, + Material.CYAN_SHULKER_BOX, + Material.BLUE_SHULKER_BOX, + Material.PURPLE_SHULKER_BOX, + Material.MAGENTA_SHULKER_BOX, + Material.PINK_SHULKER_BOX, + Material.BROWN_SHULKER_BOX, + Material.GRAY_SHULKER_BOX, + Material.LIGHT_GRAY_SHULKER_BOX, + Material.BLACK_SHULKER_BOX); + + public static final List MOB_TYPES = Arrays.asList( + EntityType.BAT, + EntityType.BLAZE, + EntityType.CAVE_SPIDER, + EntityType.CHICKEN, + EntityType.COD, + EntityType.COW, + EntityType.CREEPER, + EntityType.DOLPHIN, + EntityType.DROWNED, + EntityType.ENDER_DRAGON, + EntityType.ENDERMAN, + EntityType.EVOKER, + EntityType.GHAST, + EntityType.GIANT, + EntityType.HUSK, + EntityType.ILLUSIONER, + EntityType.IRON_GOLEM, + EntityType.HORSE, + EntityType.LLAMA, + EntityType.MAGMA_CUBE, + EntityType.MUSHROOM_COW, + EntityType.OCELOT, + EntityType.PARROT, + EntityType.PHANTOM, + EntityType.PIG, + EntityType.PIG_ZOMBIE, + EntityType.POLAR_BEAR, + EntityType.PUFFERFISH, + EntityType.SHEEP, + EntityType.SHULKER, + EntityType.SILVERFISH, + EntityType.SKELETON, + EntityType.SLIME, + EntityType.SNOWMAN, + EntityType.SPIDER, + EntityType.SQUID, + EntityType.STRAY, + EntityType.TROPICAL_FISH, + EntityType.TURTLE, + EntityType.VEX, + EntityType.VILLAGER, + EntityType.WITCH, + EntityType.WITHER, + EntityType.WITHER_SKELETON, + EntityType.VINDICATOR, + EntityType.WOLF, + EntityType.ZOMBIE); +} diff --git a/src/main/java/me/totalfreedom/totalfreedommod/util/MaterialGroup.java b/src/main/java/me/totalfreedom/totalfreedommod/util/MaterialGroup.java deleted file mode 100644 index d3b5b4ff..00000000 --- a/src/main/java/me/totalfreedom/totalfreedommod/util/MaterialGroup.java +++ /dev/null @@ -1,44 +0,0 @@ -package me.totalfreedom.totalfreedommod.util; - -import java.util.Arrays; -import java.util.List; -import org.bukkit.Material; - -public class MaterialGroup -{ - public static final List WOOL_COLORS = Arrays.asList( - Material.WHITE_WOOL, - Material.RED_WOOL, - Material.ORANGE_WOOL, - Material.YELLOW_WOOL, - Material.GREEN_WOOL, - Material.LIME_WOOL, - Material.LIGHT_BLUE_WOOL, - Material.CYAN_WOOL, - Material.BLUE_WOOL, - Material.PURPLE_WOOL, - Material.MAGENTA_WOOL, - Material.PINK_WOOL, - Material.BROWN_WOOL, - Material.GRAY_WOOL, - Material.LIGHT_GRAY_WOOL, - Material.BLACK_WOOL); - public static final List SHULKER_BOXES = Arrays.asList( - Material.SHULKER_BOX, - Material.WHITE_SHULKER_BOX, - Material.RED_SHULKER_BOX, - Material.ORANGE_SHULKER_BOX, - Material.YELLOW_SHULKER_BOX, - Material.GREEN_SHULKER_BOX, - Material.LIME_SHULKER_BOX, - Material.LIGHT_BLUE_SHULKER_BOX, - Material.CYAN_SHULKER_BOX, - Material.BLUE_SHULKER_BOX, - Material.PURPLE_SHULKER_BOX, - Material.MAGENTA_SHULKER_BOX, - Material.PINK_SHULKER_BOX, - Material.BROWN_SHULKER_BOX, - Material.GRAY_SHULKER_BOX, - Material.LIGHT_GRAY_SHULKER_BOX, - Material.BLACK_SHULKER_BOX); -}