diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-10-11 03:44:41 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-10-11 03:44:41 +0100 |
commit | ca7847e5ce17fdd83033618b9b800fac4f6401db (patch) | |
tree | d0356b420db13d02048e67f63404ac741694679c | |
parent | e9f831212121eedc2919cc3eb07c553558659120 (diff) | |
download | Essentials-ca7847e5ce17fdd83033618b9b800fac4f6401db.tar Essentials-ca7847e5ce17fdd83033618b9b800fac4f6401db.tar.gz Essentials-ca7847e5ce17fdd83033618b9b800fac4f6401db.tar.lz Essentials-ca7847e5ce17fdd83033618b9b800fac4f6401db.tar.xz Essentials-ca7847e5ce17fdd83033618b9b800fac4f6401db.zip |
Clean Imports
75 files changed, 150 insertions, 168 deletions
diff --git a/Essentials/src/com/earth2me/essentials/AlternativeCommandsHandler.java b/Essentials/src/com/earth2me/essentials/AlternativeCommandsHandler.java index 59eb5326b..ec105e315 100644 --- a/Essentials/src/com/earth2me/essentials/AlternativeCommandsHandler.java +++ b/Essentials/src/com/earth2me/essentials/AlternativeCommandsHandler.java @@ -1,9 +1,9 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.IEssentials; import org.bukkit.command.Command; import org.bukkit.command.PluginCommand; import org.bukkit.command.PluginCommandYamlParser; diff --git a/Essentials/src/com/earth2me/essentials/Backup.java b/Essentials/src/com/earth2me/essentials/Backup.java index 0c47c4800..ad5c4e729 100644 --- a/Essentials/src/com/earth2me/essentials/Backup.java +++ b/Essentials/src/com/earth2me/essentials/Backup.java @@ -1,12 +1,12 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import static com.earth2me.essentials.I18n._; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.IEssentials; import org.bukkit.Server; import org.bukkit.command.CommandSender; diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 59c6d9b14..665018a3f 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -17,11 +17,7 @@ */ package com.earth2me.essentials; -import net.ess3.api.ISettings; -import net.ess3.api.IEssentials; import static com.earth2me.essentials.I18n._; -import net.ess3.api.Economy; -import net.ess3.api.IJails; import com.earth2me.essentials.commands.EssentialsCommand; import com.earth2me.essentials.commands.IEssentialsCommand; import com.earth2me.essentials.commands.NoChargeException; @@ -48,7 +44,11 @@ import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; +import net.ess3.api.Economy; +import net.ess3.api.IEssentials; import net.ess3.api.IItemDb; +import net.ess3.api.IJails; +import net.ess3.api.ISettings; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Server; diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java index 890b8e248..225965c2b 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java @@ -1,8 +1,8 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import com.earth2me.essentials.utils.LocationUtil; import java.util.Locale; +import net.ess3.api.IEssentials; import org.bukkit.GameMode; import org.bukkit.Material; import org.bukkit.block.BlockState; diff --git a/Essentials/src/com/earth2me/essentials/EssentialsConf.java b/Essentials/src/com/earth2me/essentials/EssentialsConf.java index 2827332eb..b810fbb2e 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsConf.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsConf.java @@ -1,8 +1,6 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; - -import net.ess3.api.InvalidWorldException; import com.google.common.io.Files; import java.io.*; import java.math.BigDecimal; @@ -20,6 +18,7 @@ import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.InvalidWorldException; import org.bukkit.*; import org.bukkit.OfflinePlayer; import org.bukkit.configuration.ConfigurationSection; @@ -117,15 +116,17 @@ public class EssentialsConf extends YamlConfiguration try { long startSize = configFile.length(); - if (startSize > Integer.MAX_VALUE) { + if (startSize > Integer.MAX_VALUE) + { throw new InvalidConfigurationException("File too big"); } ByteBuffer buffer = ByteBuffer.allocate((int)startSize); int length; while ((length = inputStream.read(bytebuffer)) != -1) { - if (length > buffer.remaining()) { - ByteBuffer resize = ByteBuffer.allocate(buffer.capacity()+length-buffer.remaining()); + if (length > buffer.remaining()) + { + ByteBuffer resize = ByteBuffer.allocate(buffer.capacity() + length - buffer.remaining()); int resizePosition = buffer.position(); buffer.rewind(); resize.put(buffer); @@ -495,7 +496,7 @@ public class EssentialsConf extends YamlConfiguration { return get(path); } - + public void setProperty(final String path, final BigDecimal bigDecimal) { set(path, bigDecimal.toString()); @@ -522,14 +523,13 @@ public class EssentialsConf extends YamlConfiguration { return super.get(path, def); } - - + public synchronized BigDecimal getBigDecimal(final String path, final BigDecimal def) { final String input = super.getString(path); return toBigDecimal(input, def); } - + public static BigDecimal toBigDecimal(final String input, final BigDecimal def) { if (input == null || input.isEmpty()) @@ -809,5 +809,4 @@ public class EssentialsConf extends YamlConfiguration { super.set(path, value); } - } diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index d1fa7e9e7..a521cd927 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -1,11 +1,11 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import static com.earth2me.essentials.I18n._; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Pattern; +import net.ess3.api.IEssentials; import org.bukkit.Material; import org.bukkit.entity.*; import org.bukkit.event.EventHandler; @@ -105,14 +105,14 @@ public class EssentialsEntityListener implements Listener { ess.scheduleSyncDelayedTask( new Runnable() - { - @Override - public void run() - { - attacker.getServer().dispatchCommand(attacker.getBase(), command); - LOGGER.log(Level.INFO, String.format("[PT] %s issued server command: /%s", attacker.getName(), command)); - } - }); + { + @Override + public void run() + { + attacker.getServer().dispatchCommand(attacker.getBase(), command); + LOGGER.log(Level.INFO, String.format("[PT] %s issued server command: /%s", attacker.getName(), command)); + } + }); event.setCancelled(true); return; diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 6c55bb820..8040d42ae 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -1,6 +1,5 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.textreader.IText; import com.earth2me.essentials.textreader.KeywordReplacer; @@ -14,10 +13,10 @@ import java.util.List; import java.util.Locale; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.IEssentials; import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.World; import org.bukkit.entity.HumanEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -26,8 +25,8 @@ import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryCloseEvent; import org.bukkit.event.inventory.InventoryType; -import org.bukkit.event.player.PlayerLoginEvent.Result; import org.bukkit.event.player.*; +import org.bukkit.event.player.PlayerLoginEvent.Result; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHolder; @@ -297,7 +296,7 @@ public class EssentialsPlayerListener implements Listener user.setCompassTarget(updateLoc); } } - + @EventHandler(priority = EventPriority.LOWEST) public void onPlayerLogin2(final PlayerLoginEvent event) { @@ -308,7 +307,7 @@ public class EssentialsPlayerListener implements Listener default: return; } - + final String banReason = _("banFormat", _("defaultBanReason"), "Console"); event.disallow(Result.KICK_BANNED, banReason); } diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java index 7c3255fc0..760eb4f23 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPluginListener.java @@ -1,8 +1,8 @@ package com.earth2me.essentials; import com.earth2me.essentials.perm.PermissionsHandler; -import net.ess3.api.IEssentials; import java.util.logging.Level; +import net.ess3.api.IEssentials; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; diff --git a/Essentials/src/com/earth2me/essentials/EssentialsTimer.java b/Essentials/src/com/earth2me/essentials/EssentialsTimer.java index e0881b080..ca205ef31 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsTimer.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsTimer.java @@ -1,11 +1,11 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.Set; import java.util.logging.Level; +import net.ess3.api.IEssentials; import org.bukkit.entity.Player; diff --git a/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java b/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java index 8286d46f6..25ed00ad6 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java @@ -1,11 +1,10 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; -import com.earth2me.essentials.utils.StringUtil; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.craftbukkit.FakeWorld; import com.earth2me.essentials.settings.Spawns; import com.earth2me.essentials.storage.YamlStorageWriter; +import com.earth2me.essentials.utils.StringUtil; import java.io.*; import java.math.BigInteger; import java.security.DigestInputStream; @@ -13,6 +12,7 @@ import java.security.MessageDigest; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.IEssentials; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; diff --git a/Essentials/src/com/earth2me/essentials/I18n.java b/Essentials/src/com/earth2me/essentials/I18n.java index 15757c24d..c936bfcea 100644 --- a/Essentials/src/com/earth2me/essentials/I18n.java +++ b/Essentials/src/com/earth2me/essentials/I18n.java @@ -1,6 +1,5 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -12,6 +11,7 @@ import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Pattern; +import net.ess3.api.IEssentials; public class I18n implements net.ess3.api.II18n diff --git a/Essentials/src/com/earth2me/essentials/ItemDb.java b/Essentials/src/com/earth2me/essentials/ItemDb.java index 14833e0ce..5b87556d4 100644 --- a/Essentials/src/com/earth2me/essentials/ItemDb.java +++ b/Essentials/src/com/earth2me/essentials/ItemDb.java @@ -1,11 +1,11 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; -import com.earth2me.essentials.utils.StringUtil; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.utils.NumberUtil; +import com.earth2me.essentials.utils.StringUtil; import java.util.*; import java.util.regex.Pattern; +import net.ess3.api.IEssentials; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; diff --git a/Essentials/src/com/earth2me/essentials/Jails.java b/Essentials/src/com/earth2me/essentials/Jails.java index 034b97b08..8acf04195 100644 --- a/Essentials/src/com/earth2me/essentials/Jails.java +++ b/Essentials/src/com/earth2me/essentials/Jails.java @@ -1,13 +1,13 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; -import net.ess3.api.IUser; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.storage.AsyncStorageObjectHolder; import java.io.File; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.IEssentials; +import net.ess3.api.IUser; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.Entity; diff --git a/Essentials/src/com/earth2me/essentials/Kit.java b/Essentials/src/com/earth2me/essentials/Kit.java index a31ab722e..22af34c85 100644 --- a/Essentials/src/com/earth2me/essentials/Kit.java +++ b/Essentials/src/com/earth2me/essentials/Kit.java @@ -1,6 +1,5 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import static com.earth2me.essentials.I18n._; import static com.earth2me.essentials.I18n.capitalCase; import com.earth2me.essentials.Trade.OverflowType; @@ -9,11 +8,12 @@ import com.earth2me.essentials.craftbukkit.InventoryWorkaround; import com.earth2me.essentials.textreader.IText; import com.earth2me.essentials.textreader.KeywordReplacer; import com.earth2me.essentials.textreader.SimpleTextInput; -import com.earth2me.essentials.utils.NumberUtil; import com.earth2me.essentials.utils.DateUtil; +import com.earth2me.essentials.utils.NumberUtil; import java.math.BigDecimal; import java.util.*; import java.util.logging.Level; +import net.ess3.api.IEssentials; import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.inventory.ItemStack; diff --git a/Essentials/src/com/earth2me/essentials/ManagedFile.java b/Essentials/src/com/earth2me/essentials/ManagedFile.java index a3e0ad2e0..1d83c6894 100644 --- a/Essentials/src/com/earth2me/essentials/ManagedFile.java +++ b/Essentials/src/com/earth2me/essentials/ManagedFile.java @@ -1,6 +1,5 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import static com.earth2me.essentials.I18n._; import java.io.*; import java.math.BigInteger; @@ -12,6 +11,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.logging.Level; +import net.ess3.api.IEssentials; import org.bukkit.Bukkit; diff --git a/Essentials/src/com/earth2me/essentials/MetaItemStack.java b/Essentials/src/com/earth2me/essentials/MetaItemStack.java index b813c2edd..49d0f287a 100644 --- a/Essentials/src/com/earth2me/essentials/MetaItemStack.java +++ b/Essentials/src/com/earth2me/essentials/MetaItemStack.java @@ -1,6 +1,5 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.textreader.BookInput; import com.earth2me.essentials.textreader.BookPager; @@ -9,6 +8,7 @@ import com.earth2me.essentials.utils.FormatUtil; import com.earth2me.essentials.utils.NumberUtil; import java.util.*; import java.util.regex.Pattern; +import net.ess3.api.IEssentials; import org.bukkit.Color; import org.bukkit.DyeColor; import org.bukkit.FireworkEffect; diff --git a/Essentials/src/com/earth2me/essentials/Mob.java b/Essentials/src/com/earth2me/essentials/Mob.java index 4c635fe7d..6dbbc1cc6 100644 --- a/Essentials/src/com/earth2me/essentials/Mob.java +++ b/Essentials/src/com/earth2me/essentials/Mob.java @@ -9,7 +9,6 @@ import org.bukkit.Server; import org.bukkit.World; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; -import org.bukkit.entity.Player; // Suffixes can be appended on the end of a mob name to make it plural @@ -131,6 +130,7 @@ public enum Mob return bukkitMap.get(type); } + public static class MobException extends Exception { private static final long serialVersionUID = 1L; diff --git a/Essentials/src/com/earth2me/essentials/MobData.java b/Essentials/src/com/earth2me/essentials/MobData.java index c98c66f19..70a88a1af 100644 --- a/Essentials/src/com/earth2me/essentials/MobData.java +++ b/Essentials/src/com/earth2me/essentials/MobData.java @@ -1,9 +1,9 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.utils.StringUtil; import java.util.*; import java.util.logging.Logger; -import com.earth2me.essentials.utils.StringUtil; import org.bukkit.DyeColor; import org.bukkit.Material; import org.bukkit.entity.Ageable; @@ -38,13 +38,10 @@ public enum MobData BABY_SHEEP("lamb", EntityType.SHEEP, Data.BABY, false), BABY_COW("calf", EntityType.COW.getEntityClass(), Data.BABY, false), BABY_VILLAGER("child", EntityType.VILLAGER, Data.BABY, false), - TAMED_TAMEABLE("tamed", Tameable.class, Data.TAMED, true), TAME_TAMEABLE("tame", Tameable.class, Data.TAMED, false), - RANDOM_SHEEP("random", EntityType.SHEEP, Data.COLORABLE, true), COLORABLE_SHEEP("", StringUtil.joinList(DyeColor.values()).toLowerCase(Locale.ENGLISH), EntityType.SHEEP, Data.COLORABLE, true), - DONKEY_HORSE("donkey", EntityType.HORSE, Horse.Variant.DONKEY, true), MULE_HORSE("mule", EntityType.HORSE, Horse.Variant.MULE, true), SKELETON_HORSE("skeleton", EntityType.HORSE, Horse.Variant.SKELETON_HORSE, true), @@ -77,7 +74,6 @@ public enum MobData GOLD_ARMOR_HORSE("goldarmor", EntityType.HORSE, Material.GOLD_BARDING, true), DIAMOND_ARMOR_HORSE("diamondarmor", EntityType.HORSE, Material.DIAMOND_BARDING, true), ARMOR_HORSE("armor", EntityType.HORSE, Material.IRON_BARDING, true), - SIAMESE_CAT("siamese", EntityType.OCELOT, Ocelot.Type.SIAMESE_CAT, true), WHITE_CAT("white", EntityType.OCELOT, Ocelot.Type.SIAMESE_CAT, false), RED_CAT("red", EntityType.OCELOT, Ocelot.Type.RED_CAT, true), @@ -85,42 +81,35 @@ public enum MobData TABBY_CAT("tabby", EntityType.OCELOT, Ocelot.Type.RED_CAT, false), BLACK_CAT("black", EntityType.OCELOT, Ocelot.Type.BLACK_CAT, true), TUXEDO_CAT("tuxedo", EntityType.OCELOT, Ocelot.Type.BLACK_CAT, false), - VILLAGER_ZOMBIE("villager", EntityType.ZOMBIE.getEntityClass(), Data.VILLAGER, true), BABY_ZOMBIE("baby", EntityType.ZOMBIE.getEntityClass(), Data.BABYZOMBIE, true), - DIAMOND_SWORD_ZOMBIE("diamondsword", EntityType.ZOMBIE.getEntityClass(), Material.DIAMOND_SWORD, true), GOLD_SWORD_ZOMBIE("goldsword", EntityType.ZOMBIE.getEntityClass(), Material.GOLD_SWORD, true), IRON_SWORD_ZOMBIE("ironsword", EntityType.ZOMBIE.getEntityClass(), Material.IRON_SWORD, true), STONE_SWORD_ZOMBIE("stonesword", EntityType.ZOMBIE.getEntityClass(), Material.STONE_SWORD, false), SWORD_ZOMBIE("sword", EntityType.ZOMBIE.getEntityClass(), Material.STONE_SWORD, true), - DIAMOND_SWORD_SKELETON("diamondsword", EntityType.SKELETON, Material.DIAMOND_SWORD, true), GOLD_SWORD_SKELETON("goldsword", EntityType.SKELETON, Material.GOLD_SWORD, true), IRON_SWORD_SKELETON("ironsword", EntityType.SKELETON, Material.IRON_SWORD, true), STONE_SWORD_SKELETON("stonesword", EntityType.SKELETON, Material.STONE_SWORD, false), SWORD_SKELETON("sword", EntityType.SKELETON, Material.STONE_SWORD, true), WHITHER_SKELETON("wither", EntityType.SKELETON, Data.WITHER, true), - POWERED_CREEPER("powered", EntityType.CREEPER, Data.ELECTRIFIED, true), ELECTRIC_CREEPER("electric", EntityType.CREEPER, Data.ELECTRIFIED, false), CHARGED_CREEPER("charged", EntityType.CREEPER, Data.ELECTRIFIED, false), - SADDLE_PIG("saddle", EntityType.PIG, Data.PIGSADDLE, true), - ANGRY_WOLF("angry", EntityType.WOLF, Data.ANGRY, true), RABID_WOLF("rabid", EntityType.WOLF, Data.ANGRY, false), - FARMER_VILLAGER("farmer", EntityType.VILLAGER, Villager.Profession.FARMER, true), LIBRARIAN_VILLAGER("librarian", EntityType.VILLAGER, Villager.Profession.LIBRARIAN, true), PRIEST_VILLAGER("priest", EntityType.VILLAGER, Villager.Profession.PRIEST, true), FATHER_VILLAGER("father", EntityType.VILLAGER, Villager.Profession.PRIEST, false), SMITH_VILLAGER("smith", EntityType.VILLAGER, Villager.Profession.BLACKSMITH, true), BUTCHER_VILLAGER("butcher", EntityType.VILLAGER, Villager.Profession.BUTCHER, true), - SIZE_SLIME("", "<1-100>", EntityType.SLIME.getEntityClass(), Data.SIZE, true), NUM_EXPERIENCE_ORB("", "<1-2000000000>", EntityType.EXPERIENCE_ORB, Data.EXP, true); + public enum Data { BABY, @@ -148,7 +137,7 @@ public enum MobData this.value = value; this.isPublic = isPublic; } - + private MobData(String n, String h, Object type, Object value, boolean isPublic) { this.nickname = n; @@ -158,13 +147,11 @@ public enum MobData this.value = value; this.isPublic = isPublic; } - final private String nickname; final private String helpMessage; final private Object type; final private Object value; final private boolean isPublic; - private String matched; public static LinkedHashMap<String, MobData> getPossibleData(final Entity spawned, boolean publicOnly) @@ -184,12 +171,12 @@ public enum MobData return mobList; } - - public static List<String> getValidHelp(final Entity spawned) + + public static List<String> getValidHelp(final Entity spawned) { List<String> output = new ArrayList<String>(); LinkedHashMap<String, MobData> posData = getPossibleData(spawned, true); - + for (MobData data : posData.values()) { output.add(data.helpMessage); @@ -310,7 +297,7 @@ public enum MobData { throw new Exception(_("slimeMalformedSize"), e); } - } + } else if (this.value instanceof Horse.Color) { ((Horse)spawned).setColor((Horse.Color)this.value); diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java index 92227d592..f4bade965 100644 --- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java +++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java @@ -1,10 +1,10 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import static com.earth2me.essentials.I18n._; import java.net.InetSocketAddress; import java.util.*; import lombok.Delegate; +import net.ess3.api.IEssentials; import org.bukkit.*; import org.bukkit.block.Block; import org.bukkit.conversations.Conversation; diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index f94b3eee1..a604d6032 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -1,6 +1,5 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.commands.IEssentialsCommand; import com.earth2me.essentials.signs.EssentialsSign; @@ -13,6 +12,7 @@ import java.math.BigDecimal; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.IEssentials; import org.bukkit.ChatColor; import org.bukkit.command.PluginCommand; import org.bukkit.configuration.ConfigurationSection; @@ -411,7 +411,7 @@ public class Settings implements net.ess3.api.ISettings if (mFormat == null) { mFormat = config.getString("chat.group-formats." + (group == null ? "Default" : group), - config.getString("chat.format", "&7[{GROUP}]&r {DISPLAYNAME}&7:&r {MESSAGE}")); + config.getString("chat.format", "&7[{GROUP}]&r {DISPLAYNAME}&7:&r {MESSAGE}")); mFormat = FormatUtil.replaceFormat(mFormat); mFormat = mFormat.replace("{DISPLAYNAME}", "%1$s"); mFormat = mFormat.replace("{MESSAGE}", "%2$s"); @@ -651,14 +651,14 @@ public class Settings implements net.ess3.api.ISettings { return config.getBoolean("trade-in-stacks-" + id, false); } - // #easteregg private boolean economyDisabled = false; + public boolean _isEcoDisabled() { return config.getBoolean("disable-eco", false); } - + @Override public boolean isEcoDisabled() { @@ -1112,7 +1112,7 @@ public class Settings implements net.ess3.api.ISettings { return config.getInt("max-nick-length", 30); } - + // #easteregg public int getMaxUserCacheCount() { diff --git a/Essentials/src/com/earth2me/essentials/SpawnMob.java b/Essentials/src/com/earth2me/essentials/SpawnMob.java index 57addefca..53b8703a6 100644 --- a/Essentials/src/com/earth2me/essentials/SpawnMob.java +++ b/Essentials/src/com/earth2me/essentials/SpawnMob.java @@ -1,15 +1,15 @@ package com.earth2me.essentials; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IEssentials; -import com.earth2me.essentials.utils.StringUtil; import com.earth2me.essentials.Mob.MobException; import com.earth2me.essentials.utils.LocationUtil; +import com.earth2me.essentials.utils.StringUtil; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Set; +import net.ess3.api.IEssentials; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Server; diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index f6701f99e..f30ba5d98 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -1,12 +1,12 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; -import net.ess3.api.IUser; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.utils.DateUtil; import com.earth2me.essentials.utils.LocationUtil; import java.util.Calendar; import java.util.GregorianCalendar; +import net.ess3.api.IEssentials; +import net.ess3.api.IUser; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerRespawnEvent; diff --git a/Essentials/src/com/earth2me/essentials/TimedTeleport.java b/Essentials/src/com/earth2me/essentials/TimedTeleport.java index f0da994d4..15e5642f3 100644 --- a/Essentials/src/com/earth2me/essentials/TimedTeleport.java +++ b/Essentials/src/com/earth2me/essentials/TimedTeleport.java @@ -1,8 +1,8 @@ package com.earth2me.essentials; +import static com.earth2me.essentials.I18n._; import net.ess3.api.IEssentials; import net.ess3.api.IUser; -import static com.earth2me.essentials.I18n._; import org.bukkit.Location; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; diff --git a/Essentials/src/com/earth2me/essentials/Trade.java b/Essentials/src/com/earth2me/essentials/Trade.java index fcb9e38f7..37d6fdf02 100644 --- a/Essentials/src/com/earth2me/essentials/Trade.java +++ b/Essentials/src/com/earth2me/essentials/Trade.java @@ -1,7 +1,5 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; -import net.ess3.api.IUser; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.craftbukkit.InventoryWorkaround; import com.earth2me.essentials.craftbukkit.SetExpFix; @@ -15,6 +13,8 @@ import java.util.Locale; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.IEssentials; +import net.ess3.api.IUser; import org.bukkit.Location; import org.bukkit.entity.Item; import org.bukkit.inventory.ItemStack; diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 6253b212e..ddc158c3f 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -1,17 +1,17 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.commands.IEssentialsCommand; import com.earth2me.essentials.register.payment.Method; -import com.earth2me.essentials.utils.NumberUtil; import com.earth2me.essentials.utils.DateUtil; import com.earth2me.essentials.utils.FormatUtil; +import com.earth2me.essentials.utils.NumberUtil; import java.math.BigDecimal; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.IEssentials; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.command.CommandSender; diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index 7a8b9b9ae..12b396e13 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -1,12 +1,12 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; -import com.earth2me.essentials.utils.StringUtil; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.utils.NumberUtil; +import com.earth2me.essentials.utils.StringUtil; import java.io.File; import java.math.BigDecimal; import java.util.*; +import net.ess3.api.IEssentials; import org.bukkit.Location; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.entity.Player; diff --git a/Essentials/src/com/earth2me/essentials/UserMap.java b/Essentials/src/com/earth2me/essentials/UserMap.java index 6ee46b907..d1cbea10e 100644 --- a/Essentials/src/com/earth2me/essentials/UserMap.java +++ b/Essentials/src/com/earth2me/essentials/UserMap.java @@ -1,6 +1,5 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import com.earth2me.essentials.utils.StringUtil; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; @@ -11,6 +10,7 @@ import java.util.Collections; import java.util.Set; import java.util.concurrent.ConcurrentSkipListSet; import java.util.concurrent.ExecutionException; +import net.ess3.api.IEssentials; import org.bukkit.entity.Player; diff --git a/Essentials/src/com/earth2me/essentials/Warps.java b/Essentials/src/com/earth2me/essentials/Warps.java index 89430bb2f..12c2343e6 100644 --- a/Essentials/src/com/earth2me/essentials/Warps.java +++ b/Essentials/src/com/earth2me/essentials/Warps.java @@ -1,15 +1,15 @@ package com.earth2me.essentials; -import com.earth2me.essentials.utils.StringUtil; import static com.earth2me.essentials.I18n._; -import net.ess3.api.InvalidNameException; -import net.ess3.api.InvalidWorldException; import com.earth2me.essentials.commands.WarpNotFoundException; +import com.earth2me.essentials.utils.StringUtil; import java.io.File; import java.io.IOException; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.InvalidNameException; +import net.ess3.api.InvalidWorldException; import org.bukkit.Location; import org.bukkit.Server; diff --git a/Essentials/src/com/earth2me/essentials/api/Economy.java b/Essentials/src/com/earth2me/essentials/api/Economy.java index 9ad60e4a6..43a612b84 100644 --- a/Essentials/src/com/earth2me/essentials/api/Economy.java +++ b/Essentials/src/com/earth2me/essentials/api/Economy.java @@ -1,26 +1,26 @@ package com.earth2me.essentials.api; -import static net.ess3.api.Economy.add; -import static net.ess3.api.Economy.divide; -import static net.ess3.api.Economy.format; -import static net.ess3.api.Economy.getMoneyExact; -import static net.ess3.api.Economy.hasEnough; -import static net.ess3.api.Economy.hasLess; -import static net.ess3.api.Economy.hasMore; -import static net.ess3.api.Economy.multiply; -import static net.ess3.api.Economy.setMoney; -import static net.ess3.api.Economy.substract; -import net.ess3.api.IEssentials; import com.earth2me.essentials.EssentialsConf; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; -import com.earth2me.essentials.utils.StringUtil; +import static com.earth2me.essentials.api.Economy.add; +import static com.earth2me.essentials.api.Economy.divide; +import static com.earth2me.essentials.api.Economy.format; +import static com.earth2me.essentials.api.Economy.getMoneyExact; +import static com.earth2me.essentials.api.Economy.hasEnough; +import static com.earth2me.essentials.api.Economy.hasLess; +import static com.earth2me.essentials.api.Economy.hasMore; +import static com.earth2me.essentials.api.Economy.multiply; +import static com.earth2me.essentials.api.Economy.setMoney; +import static com.earth2me.essentials.api.Economy.substract; import com.earth2me.essentials.utils.NumberUtil; +import com.earth2me.essentials.utils.StringUtil; import java.io.File; import java.math.BigDecimal; import java.math.MathContext; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.IEssentials; /** diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java index f42676942..6d9016a31 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java @@ -2,8 +2,8 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; -import org.bukkit.command.CommandSender; import org.bukkit.Server; +import org.bukkit.command.CommandSender; public class Commandafk extends EssentialsCommand diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java index 8dba44a6b..70310cf2a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmail.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmail.java @@ -2,8 +2,8 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; -import com.earth2me.essentials.utils.StringUtil; import com.earth2me.essentials.utils.FormatUtil; +import com.earth2me.essentials.utils.StringUtil; import java.util.List; import org.bukkit.Server; import org.bukkit.command.CommandSender; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandptime.java b/Essentials/src/com/earth2me/essentials/commands/Commandptime.java index a0c0deb8c..8c0fd7dfa 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandptime.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandptime.java @@ -1,8 +1,8 @@ package com.earth2me.essentials.commands; -import com.earth2me.essentials.utils.DescParseTickFormat; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import com.earth2me.essentials.utils.DescParseTickFormat; import java.util.*; import org.bukkit.Server; import org.bukkit.World; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java b/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java index 52bf26513..df5310915 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java @@ -1,12 +1,12 @@ package com.earth2me.essentials.commands; -import net.ess3.api.IUser; -import com.earth2me.essentials.utils.StringUtil; -import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.*; +import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.utils.StringUtil; import java.util.ArrayList; import java.util.List; import java.util.Locale; +import net.ess3.api.IUser; import org.bukkit.Material; import org.bukkit.Server; import org.bukkit.inventory.ItemStack; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java index da041d844..6393b2e4e 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandseen.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandseen.java @@ -3,9 +3,9 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import com.earth2me.essentials.UserMap; -import com.earth2me.essentials.utils.StringUtil; import com.earth2me.essentials.utils.DateUtil; import com.earth2me.essentials.utils.FormatUtil; +import com.earth2me.essentials.utils.StringUtil; import java.util.ArrayList; import java.util.List; import org.bukkit.Location; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java index 6144c1352..0148f0e6b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java @@ -3,8 +3,8 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import com.earth2me.essentials.api.IWarps; -import com.earth2me.essentials.utils.StringUtil; import com.earth2me.essentials.utils.NumberUtil; +import com.earth2me.essentials.utils.StringUtil; import org.bukkit.Location; import org.bukkit.Server; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java b/Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java index 7259ae7cc..54344124a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java @@ -2,8 +2,8 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; -import org.bukkit.command.CommandSender; import org.bukkit.Server; +import org.bukkit.command.CommandSender; public class Commandsocialspy extends EssentialsToggleCommand diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java index ea57ca7ad..38e84870a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawner.java @@ -4,9 +4,9 @@ import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.Mob; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; -import com.earth2me.essentials.utils.StringUtil; import com.earth2me.essentials.utils.LocationUtil; import com.earth2me.essentials.utils.NumberUtil; +import com.earth2me.essentials.utils.StringUtil; import java.util.Locale; import org.bukkit.Location; import org.bukkit.Material; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java index 9dd60d2bc..39fd58550 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java @@ -1,8 +1,6 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.ITarget; -import com.earth2me.essentials.PlayerTarget; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; import org.bukkit.Server; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java index 4a739149f..430c36220 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java @@ -1,17 +1,17 @@ package com.earth2me.essentials.commands; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IUser; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; import com.earth2me.essentials.api.IWarps; -import com.earth2me.essentials.utils.StringUtil; import com.earth2me.essentials.utils.NumberUtil; +import com.earth2me.essentials.utils.StringUtil; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Locale; +import net.ess3.api.IUser; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java index fe193bbf0..b3005d869 100644 --- a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java +++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java @@ -1,12 +1,12 @@ package com.earth2me.essentials.commands; -import net.ess3.api.IEssentials; import com.earth2me.essentials.*; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.utils.FormatUtil; import java.util.List; import java.util.Locale; import java.util.logging.Logger; +import net.ess3.api.IEssentials; import org.bukkit.Server; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; diff --git a/Essentials/src/com/earth2me/essentials/commands/IEssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/IEssentialsCommand.java index 69deea3a0..4a946d814 100644 --- a/Essentials/src/com/earth2me/essentials/commands/IEssentialsCommand.java +++ b/Essentials/src/com/earth2me/essentials/commands/IEssentialsCommand.java @@ -1,8 +1,8 @@ package com.earth2me.essentials.commands; -import net.ess3.api.IEssentials; import com.earth2me.essentials.IEssentialsModule; import com.earth2me.essentials.User; +import net.ess3.api.IEssentials; import org.bukkit.Server; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java index 246d00885..2edbf1a80 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsListener.java @@ -1,8 +1,8 @@ package com.earth2me.essentials.metrics; -import net.ess3.api.IEssentials; import com.earth2me.essentials.User; import java.util.logging.Level; +import net.ess3.api.IEssentials; import org.bukkit.Server; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; diff --git a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java index 6facec58c..0ce162217 100644 --- a/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java +++ b/Essentials/src/com/earth2me/essentials/metrics/MetricsStarter.java @@ -1,6 +1,5 @@ package com.earth2me.essentials.metrics; -import net.ess3.api.IEssentials; import com.earth2me.essentials.metrics.Metrics.Graph; import com.earth2me.essentials.metrics.Metrics.Plotter; import com.earth2me.essentials.register.payment.Method; @@ -8,6 +7,7 @@ import com.earth2me.essentials.register.payment.methods.VaultEco; import com.earth2me.essentials.signs.EssentialsSign; import java.util.Locale; import java.util.logging.Level; +import net.ess3.api.IEssentials; import org.bukkit.configuration.ConfigurationSection; diff --git a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java index 62691fffa..a0e862730 100644 --- a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java +++ b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java @@ -1,13 +1,13 @@ package com.earth2me.essentials.signs; -import net.ess3.api.IEssentials; -import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.*; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.utils.NumberUtil; import java.math.BigDecimal; import java.util.HashSet; import java.util.Locale; import java.util.Set; +import net.ess3.api.IEssentials; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBalance.java b/Essentials/src/com/earth2me/essentials/signs/SignBalance.java index 98b258a14..0682a46c5 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignBalance.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignBalance.java @@ -1,9 +1,9 @@ package com.earth2me.essentials.signs; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IEssentials; import com.earth2me.essentials.User; import com.earth2me.essentials.utils.NumberUtil; +import net.ess3.api.IEssentials; public class SignBalance extends EssentialsSign diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java index e3046c95b..36da6e354 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java @@ -1,10 +1,10 @@ package com.earth2me.essentials.signs; -import net.ess3.api.IEssentials; import com.earth2me.essentials.User; import com.earth2me.essentials.utils.FormatUtil; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.IEssentials; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Sign; diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBuy.java b/Essentials/src/com/earth2me/essentials/signs/SignBuy.java index 995ccbc48..13ed4faaf 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignBuy.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignBuy.java @@ -1,9 +1,9 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.ChargeException; -import net.ess3.api.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; +import net.ess3.api.IEssentials; public class SignBuy extends EssentialsSign diff --git a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java index cde59ca3b..97a434e34 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignDisposal.java @@ -1,7 +1,7 @@ package com.earth2me.essentials.signs; -import net.ess3.api.IEssentials; import com.earth2me.essentials.User; +import net.ess3.api.IEssentials; public class SignDisposal extends EssentialsSign diff --git a/Essentials/src/com/earth2me/essentials/signs/SignEnchant.java b/Essentials/src/com/earth2me/essentials/signs/SignEnchant.java index c3ad54de7..c5120b8e2 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignEnchant.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignEnchant.java @@ -1,9 +1,9 @@ package com.earth2me.essentials.signs; -import net.ess3.api.IEssentials; -import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.*; +import static com.earth2me.essentials.I18n._; import java.util.Locale; +import net.ess3.api.IEssentials; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemStack; diff --git a/Essentials/src/com/earth2me/essentials/signs/SignFree.java b/Essentials/src/com/earth2me/essentials/signs/SignFree.java index b1f16851b..90aadbd6c 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignFree.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignFree.java @@ -1,9 +1,9 @@ package com.earth2me.essentials.signs; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; +import net.ess3.api.IEssentials; import org.bukkit.Material; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; diff --git a/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java b/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java index a775092f3..126fd0124 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignGameMode.java @@ -2,10 +2,10 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.ChargeException; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; import java.util.Locale; +import net.ess3.api.IEssentials; import org.bukkit.GameMode; import org.bukkit.entity.Player; diff --git a/Essentials/src/com/earth2me/essentials/signs/SignHeal.java b/Essentials/src/com/earth2me/essentials/signs/SignHeal.java index 9305f2189..edd15ce29 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignHeal.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignHeal.java @@ -2,9 +2,9 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.ChargeException; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; +import net.ess3.api.IEssentials; public class SignHeal extends EssentialsSign diff --git a/Essentials/src/com/earth2me/essentials/signs/SignInfo.java b/Essentials/src/com/earth2me/essentials/signs/SignInfo.java index 7b844cb10..050cc3d57 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignInfo.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignInfo.java @@ -1,7 +1,6 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.ChargeException; -import net.ess3.api.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; import com.earth2me.essentials.textreader.IText; @@ -9,6 +8,7 @@ import com.earth2me.essentials.textreader.KeywordReplacer; import com.earth2me.essentials.textreader.TextInput; import com.earth2me.essentials.textreader.TextPager; import java.io.IOException; +import net.ess3.api.IEssentials; public class SignInfo extends EssentialsSign diff --git a/Essentials/src/com/earth2me/essentials/signs/SignKit.java b/Essentials/src/com/earth2me/essentials/signs/SignKit.java index a2964d7f2..ed7a9d753 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignKit.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignKit.java @@ -1,12 +1,12 @@ package com.earth2me.essentials.signs; -import net.ess3.api.IEssentials; -import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.*; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.commands.NoChargeException; import java.util.List; import java.util.Locale; import java.util.Map; +import net.ess3.api.IEssentials; public class SignKit extends EssentialsSign diff --git a/Essentials/src/com/earth2me/essentials/signs/SignMail.java b/Essentials/src/com/earth2me/essentials/signs/SignMail.java index af21ba382..85859b2ea 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignMail.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignMail.java @@ -1,9 +1,9 @@ package com.earth2me.essentials.signs; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IEssentials; import com.earth2me.essentials.User; import java.util.List; +import net.ess3.api.IEssentials; public class SignMail extends EssentialsSign diff --git a/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java b/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java index fc7234ac5..8c52beeb0 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java @@ -1,7 +1,7 @@ package com.earth2me.essentials.signs; -import net.ess3.api.IEssentials; import java.util.logging.Level; +import net.ess3.api.IEssentials; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Sign; diff --git a/Essentials/src/com/earth2me/essentials/signs/SignProtection.java b/Essentials/src/com/earth2me/essentials/signs/SignProtection.java index 13e85340c..a7d6b8fae 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignProtection.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignProtection.java @@ -1,11 +1,11 @@ package com.earth2me.essentials.signs; -import net.ess3.api.IEssentials; -import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.*; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.Trade.OverflowType; import com.earth2me.essentials.utils.FormatUtil; import java.util.*; +import net.ess3.api.IEssentials; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/Essentials/src/com/earth2me/essentials/signs/SignRepair.java b/Essentials/src/com/earth2me/essentials/signs/SignRepair.java index 3ab7d6b0a..2348a0974 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignRepair.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignRepair.java @@ -2,11 +2,11 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.ChargeException; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; import com.earth2me.essentials.commands.Commandrepair; import com.earth2me.essentials.commands.NotEnoughArgumentsException; +import net.ess3.api.IEssentials; public class SignRepair extends EssentialsSign diff --git a/Essentials/src/com/earth2me/essentials/signs/SignSell.java b/Essentials/src/com/earth2me/essentials/signs/SignSell.java index fb490a90c..344fff61b 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignSell.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignSell.java @@ -1,10 +1,10 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.ChargeException; -import net.ess3.api.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.Trade.OverflowType; import com.earth2me.essentials.User; +import net.ess3.api.IEssentials; public class SignSell extends EssentialsSign diff --git a/Essentials/src/com/earth2me/essentials/signs/SignSpawnmob.java b/Essentials/src/com/earth2me/essentials/signs/SignSpawnmob.java index 9f2f47ca7..b271b8951 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignSpawnmob.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignSpawnmob.java @@ -1,8 +1,8 @@ package com.earth2me.essentials.signs; -import net.ess3.api.IEssentials; import com.earth2me.essentials.*; import java.util.List; +import net.ess3.api.IEssentials; public class SignSpawnmob extends EssentialsSign diff --git a/Essentials/src/com/earth2me/essentials/signs/SignTime.java b/Essentials/src/com/earth2me/essentials/signs/SignTime.java index b82fc34ae..026f9f19d 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignTime.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignTime.java @@ -2,9 +2,9 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.ChargeException; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; +import net.ess3.api.IEssentials; public class SignTime extends EssentialsSign diff --git a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java index 05b488d29..501ea2a7b 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java @@ -1,13 +1,13 @@ package com.earth2me.essentials.signs; -import net.ess3.api.IEssentials; -import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.Trade.TradeType; import com.earth2me.essentials.*; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.Trade.OverflowType; +import com.earth2me.essentials.Trade.TradeType; import com.earth2me.essentials.utils.NumberUtil; import java.math.BigDecimal; import java.util.Map; +import net.ess3.api.IEssentials; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; diff --git a/Essentials/src/com/earth2me/essentials/signs/SignWarp.java b/Essentials/src/com/earth2me/essentials/signs/SignWarp.java index 39f21a63c..1d6960d14 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignWarp.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignWarp.java @@ -2,9 +2,9 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.ChargeException; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; +import net.ess3.api.IEssentials; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; diff --git a/Essentials/src/com/earth2me/essentials/signs/SignWeather.java b/Essentials/src/com/earth2me/essentials/signs/SignWeather.java index 95ad04542..45f715826 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignWeather.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignWeather.java @@ -2,9 +2,9 @@ package com.earth2me.essentials.signs; import com.earth2me.essentials.ChargeException; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IEssentials; import com.earth2me.essentials.Trade; import com.earth2me.essentials.User; +import net.ess3.api.IEssentials; public class SignWeather extends EssentialsSign diff --git a/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java b/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java index d52af366e..752a48289 100644 --- a/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java +++ b/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileReader.java @@ -1,11 +1,11 @@ package com.earth2me.essentials.storage; -import net.ess3.api.IEssentials; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.logging.Level; +import net.ess3.api.IEssentials; import org.bukkit.Bukkit; diff --git a/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java b/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java index c8001a923..cf1c1c90e 100644 --- a/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java +++ b/Essentials/src/com/earth2me/essentials/storage/AbstractDelayedYamlFileWriter.java @@ -1,10 +1,10 @@ package com.earth2me.essentials.storage; -import net.ess3.api.IEssentials; import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.util.logging.Level; +import net.ess3.api.IEssentials; import org.bukkit.Bukkit; diff --git a/Essentials/src/com/earth2me/essentials/storage/AsyncStorageObjectHolder.java b/Essentials/src/com/earth2me/essentials/storage/AsyncStorageObjectHolder.java index 66cb60010..f9dc52b18 100644 --- a/Essentials/src/com/earth2me/essentials/storage/AsyncStorageObjectHolder.java +++ b/Essentials/src/com/earth2me/essentials/storage/AsyncStorageObjectHolder.java @@ -1,11 +1,11 @@ package com.earth2me.essentials.storage; import com.earth2me.essentials.IConf; -import net.ess3.api.IEssentials; -import net.ess3.api.IReload; import java.io.File; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.logging.Level; +import net.ess3.api.IEssentials; +import net.ess3.api.IReload; import org.bukkit.Bukkit; diff --git a/Essentials/src/com/earth2me/essentials/textreader/BookInput.java b/Essentials/src/com/earth2me/essentials/textreader/BookInput.java index f5a9333de..47e81ddbb 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/BookInput.java +++ b/Essentials/src/com/earth2me/essentials/textreader/BookInput.java @@ -1,9 +1,9 @@ package com.earth2me.essentials.textreader; -import net.ess3.api.IEssentials; import java.io.*; import java.lang.ref.SoftReference; import java.util.*; +import net.ess3.api.IEssentials; public class BookInput implements IText diff --git a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java index 268bb52e5..fbada7bb9 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java +++ b/Essentials/src/com/earth2me/essentials/textreader/HelpInput.java @@ -1,12 +1,12 @@ package com.earth2me.essentials.textreader; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IEssentials; import com.earth2me.essentials.User; import java.io.IOException; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.IEssentials; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginDescriptionFile; diff --git a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java index 30660a971..b8c1a13a3 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java +++ b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java @@ -1,8 +1,11 @@ package com.earth2me.essentials.textreader; import com.earth2me.essentials.ExecuteTimer; -import net.ess3.api.IEssentials; +import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.PlayerList; import com.earth2me.essentials.User; +import static com.earth2me.essentials.textreader.KeywordType.DISPLAYNAME; +import static com.earth2me.essentials.textreader.KeywordType.PLAYER; import com.earth2me.essentials.utils.DateUtil; import com.earth2me.essentials.utils.DescParseTickFormat; import com.earth2me.essentials.utils.NumberUtil; @@ -10,25 +13,21 @@ import java.lang.management.ManagementFactory; import java.text.DateFormat; import java.util.ArrayList; import java.util.Date; +import java.util.EnumMap; +import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; +import java.util.logging.Level; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import net.ess3.api.IEssentials; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; -import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.PlayerList; -import static com.earth2me.essentials.textreader.KeywordType.DISPLAYNAME; -import static com.earth2me.essentials.textreader.KeywordType.PLAYER; -import java.util.EnumMap; -import java.util.HashMap; -import java.util.Locale; -import java.util.logging.Level; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - public class KeywordReplacer implements IText { diff --git a/Essentials/src/com/earth2me/essentials/textreader/TextInput.java b/Essentials/src/com/earth2me/essentials/textreader/TextInput.java index 2d35c7a17..7d3bb02cf 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/TextInput.java +++ b/Essentials/src/com/earth2me/essentials/textreader/TextInput.java @@ -1,12 +1,12 @@ package com.earth2me.essentials.textreader; -import net.ess3.api.IEssentials; import com.earth2me.essentials.User; import com.earth2me.essentials.utils.FormatUtil; import com.earth2me.essentials.utils.StringUtil; import java.io.*; import java.lang.ref.SoftReference; import java.util.*; +import net.ess3.api.IEssentials; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/Essentials/src/com/earth2me/essentials/utils/FormatUtil.java b/Essentials/src/com/earth2me/essentials/utils/FormatUtil.java index 600b1df01..ca66f5d82 100644 --- a/Essentials/src/com/earth2me/essentials/utils/FormatUtil.java +++ b/Essentials/src/com/earth2me/essentials/utils/FormatUtil.java @@ -1,7 +1,7 @@ package com.earth2me.essentials.utils; -import net.ess3.api.IUser; import java.util.regex.Pattern; +import net.ess3.api.IUser; public class FormatUtil diff --git a/Essentials/src/com/earth2me/essentials/utils/NumberUtil.java b/Essentials/src/com/earth2me/essentials/utils/NumberUtil.java index d02b0928b..c59461049 100644 --- a/Essentials/src/com/earth2me/essentials/utils/NumberUtil.java +++ b/Essentials/src/com/earth2me/essentials/utils/NumberUtil.java @@ -1,12 +1,12 @@ package com.earth2me.essentials.utils; import static com.earth2me.essentials.I18n._; -import net.ess3.api.IEssentials; import java.math.BigDecimal; import java.math.RoundingMode; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; +import net.ess3.api.IEssentials; public class NumberUtil diff --git a/Essentials/test/com/earth2me/essentials/EconomyTest.java b/Essentials/test/com/earth2me/essentials/EconomyTest.java index d25df2f61..de73cc15e 100644 --- a/Essentials/test/com/earth2me/essentials/EconomyTest.java +++ b/Essentials/test/com/earth2me/essentials/EconomyTest.java @@ -2,9 +2,9 @@ package com.earth2me.essentials; import com.earth2me.essentials.api.NoLoanPermittedException; import com.earth2me.essentials.api.UserDoesNotExistException; -import net.ess3.api.Economy; import java.io.IOException; import junit.framework.TestCase; +import net.ess3.api.Economy; import org.bukkit.World.Environment; import org.bukkit.plugin.InvalidDescriptionException; import org.junit.Test; diff --git a/Essentials/test/com/earth2me/essentials/FakeServer.java b/Essentials/test/com/earth2me/essentials/FakeServer.java index d9be68178..bd604ccd4 100644 --- a/Essentials/test/com/earth2me/essentials/FakeServer.java +++ b/Essentials/test/com/earth2me/essentials/FakeServer.java @@ -1,13 +1,14 @@ package com.earth2me.essentials; -import net.ess3.api.IEssentials; import com.avaje.ebean.config.ServerConfig; +import com.earth2me.essentials.OfflinePlayer; import com.earth2me.essentials.craftbukkit.FakeWorld; import java.io.File; import java.util.*; import java.util.concurrent.Callable; import java.util.concurrent.Future; import java.util.logging.Logger; +import net.ess3.api.IEssentials; import org.bukkit.*; import org.bukkit.Warning.WarningState; import org.bukkit.World.Environment; @@ -228,8 +229,7 @@ public class FakeServer implements Server @Override public void callEvent(Event event) throws IllegalStateException { - Logger.getGlobal().info("Called event " + event.getEventName()); - return; + Logger.getLogger("Minecraft").info("Called event " + event.getEventName()); } @Override |