yay more things

This commit is contained in:
ZeroEpoch1969 2019-01-27 18:49:07 -07:00
parent 7c6c407f78
commit 3d7d363e30
No known key found for this signature in database
GPG Key ID: A7BAB4E14F089CF3
17 changed files with 233 additions and 103 deletions

View File

@ -16,13 +16,13 @@
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot:1.13.1-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.Pravian:Aero:5f82926" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.12-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:guava:21.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.18" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
<orderEntry type="library" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:21.0" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.18" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.12-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TotalFreedom:BukkitTelnet:4.5-pre1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.logging.log4j:log4j-core:2.5" level="project" />
@ -32,12 +32,12 @@
<orderEntry type="library" scope="PROVIDED" name="Maven: com.comphenix.protocol:ProtocolLib-API:4.4.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: cglib:cglib-nodep:3.2.5" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.comphenix.executors:BukkitExecutors:1.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TFPatches:TF-WorldEdit:c0f82ebeff" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TFPatches.TF-WorldEdit:worldedit-bukkit:c0f82ebeff" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TFPatches:TF-WorldEdit:0909dc1972" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TFPatches.TF-WorldEdit:worldedit-bukkit:0909dc1972" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q:dummypermscompat:1.8" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bstats:bstats-bukkit:1.4" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: io.papermc:paperlib:1.0.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TFPatches.TF-WorldEdit:worldedit-core:c0f82ebeff" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TFPatches.TF-WorldEdit:worldedit-core:0909dc1972" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: de.schlichtherle:truezip:6.8.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: rhino:js:1.7R2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q:jchronic:0.2.4a" level="project" />
@ -48,7 +48,7 @@
<orderEntry type="library" scope="PROVIDED" name="Maven: net.dv8tion:JDA:3.8.0_423" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jetbrains:annotations:16.0.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.neovisionaries:nv-websocket-client:2.5" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.squareup.okhttp3:okhttp:3.8.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.squareup.okio:okio:1.13.0" level="project" />
@ -59,9 +59,22 @@
<orderEntry type="library" scope="PROVIDED" name="Maven: org.json:json:20160810" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.sf.trove4j:trove4j:3.0.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.coreprotect:coreprotect:2.15.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.13-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.bukkit:bukkit:1.13-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit:worldedit-bukkit:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit:worldedit-core:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldguard:worldguard-legacy:6.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TFPatches:TF-WorldGuard:50fd4cb470" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TFPatches.TF-WorldGuard:worldguard-core:50fd4cb470" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.intake:intake:4.2-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q:squirrelid:0.2.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.flywaydb:flyway-core:3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.khelekore:prtree:1.5.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.sf.opencsv:opencsv:2.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TFPatches.TF-WorldGuard:worldguard-legacy:50fd4cb470" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q:commandbook:2.3" level="project" />
<orderEntry type="library" name="Maven: com.github.TFPatches:BukkitSSH:master-1.2-ge9214e4-23" level="project" />
<orderEntry type="library" name="Maven: org.apache.sshd:sshd-core:1.6.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.mina:mina-core:2.0.16" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-jdk14:1.7.25" level="project" />
<orderEntry type="library" name="Maven: jline:jline:2.12.1" level="project" />
</component>
</module>

View File

@ -130,7 +130,7 @@
<dependency>
<groupId>com.github.TFPatches</groupId>
<artifactId>TF-WorldEdit</artifactId>
<version>c0f82ebeff</version>
<version>0909dc1972</version>
<scope>provided</scope>
</dependency>
@ -163,9 +163,9 @@
</dependency>
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-legacy</artifactId>
<version>6.2</version>
<groupId>com.github.TFPatches</groupId>
<artifactId>TF-WorldGuard</artifactId>
<version>50fd4cb470</version>
<scope>provided</scope>
</dependency>

View File

@ -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;

View File

@ -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();

View File

@ -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<String, ProtectedRegion> regions = rm.getRegions();
Map<String, ProtectedRegion> 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()

View File

@ -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 = "/<command>", aliases = "mp")
@CommandParameters(description = "Purge all mobs in all worlds.", usage = "/<command> [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++;
}

View File

@ -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;
}

View File

@ -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

View File

@ -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<String> tabComplete(CommandSender sender, Command command, String alias, String[] args)
{
return Arrays.asList("list", "clean", "reload", "setrank", "add", "remove", "info");
}*/
}

View File

@ -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 = "/<command> <world>")
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;
}
}

View File

@ -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<TotalFreedomMod>
{
@ -68,6 +76,12 @@ public abstract class FreedomCommand extends AbstractCommandBase<TotalFreedomMod
protected abstract boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole);
/*@Override
public List<String> tabComplete(CommandSender sender, Command command, String alias, String[] args)
{
return Arrays.asList("x", "d");
}*/
protected void checkConsole()
{
if (!isConsole())

View File

@ -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));
}

View File

@ -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++)

View File

@ -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("<li><a href=\"/schematic/download?schematicName=" + filename + "\">" + filename + "</a></li>");
}
else if (filename.length() > 254)
{
schematicsFormatted.add("<li>" + filename + " - (Filename too long, can't download)</li>");
}
else
{
schematicsFormatted.add("<li>" + filename + " - (Illegal filename, can't download)</li>");

View File

@ -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);

View File

@ -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<Material> 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<Material> 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<EntityType> 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);
}

View File

@ -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<Material> 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<Material> 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);
}