From 57f18eeb9321b903a40a9d3ae6bd4eef3f2c252e Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 14 Jan 2015 03:38:15 +1100 Subject: [PATCH] minor fixes --- PlotSquared/pom.xml | 6 +- .../jnbt/CompoundTagBuilder.java | 4 +- .../intellectualcrafters/jnbt/ListTag.java | 5 +- .../jnbt/ListTagBuilder.java | 4 +- .../intellectualcrafters/json/JSONObject.java | 9 +- .../json/JSONTokener.java | 7 +- .../intellectualcrafters/plot/PlotMain.java | 2 +- .../plot/api/PlotAPI.java | 82 ++++++++++--------- .../plot/commands/Auto.java | 13 ++- .../plot/commands/Ban.java | 3 +- .../plot/commands/Buy.java | 15 ++-- .../plot/commands/Claim.java | 13 ++- .../plot/commands/Clear.java | 5 +- .../plot/commands/Clipboard.java | 7 +- .../plot/commands/CommandPermission.java | 3 +- .../plot/commands/Comment.java | 11 +-- .../plot/commands/Copy.java | 4 +- .../plot/commands/CreateRoadSchematic.java | 13 +-- .../plot/commands/DEOP.java | 3 +- .../plot/commands/Database.java | 19 +++-- .../plot/commands/Debug.java | 7 +- .../plot/commands/DebugClaimTest.java | 27 +++--- .../plot/commands/DebugClear.java | 7 +- .../plot/commands/DebugLoadTest.java | 8 +- .../plot/commands/DebugRoadRegen.java | 6 +- .../plot/commands/DebugSaveTest.java | 8 +- .../plot/commands/Delete.java | 6 +- .../plot/commands/Denied.java | 11 +-- .../plot/commands/Helpers.java | 11 +-- .../plot/commands/Home.java | 4 +- .../plot/commands/Inbox.java | 16 ++-- .../plot/commands/Info.java | 20 ++--- .../plot/commands/Inventory.java | 4 +- .../plot/commands/Kick.java | 6 +- .../plot/commands/MainCommand.java | 15 ++-- .../plot/commands/Merge.java | 18 ++-- .../plot/commands/MusicSubcommand.java | 11 +-- .../plot/commands/OP.java | 3 +- .../plot/commands/Paste.java | 4 +- .../plot/commands/Purge.java | 9 +- .../plot/commands/Rate.java | 4 +- .../plot/commands/RegenAllRoads.java | 16 +--- .../plot/commands/Reload.java | 3 +- .../plot/commands/Schematic.java | 27 +++--- .../plot/commands/Set.java | 28 +++---- .../plot/commands/SetOwner.java | 11 +-- .../plot/commands/Setup.java | 29 ++++--- .../plot/commands/SubCommand.java | 9 +- .../plot/commands/Swap.java | 6 +- .../plot/commands/TP.java | 9 +- .../plot/commands/Trim.java | 19 ++--- .../plot/commands/Trusted.java | 11 +-- .../plot/commands/Unban.java | 3 +- .../plot/commands/Unclaim.java | 8 +- .../plot/commands/Unlink.java | 11 +-- .../plot/commands/Visit.java | 11 +-- .../plot/commands/WE_Anywhere.java | 4 +- .../plot/commands/list.java | 12 +-- .../plot/commands/plugin.java | 13 +-- .../intellectualcrafters/plot/config/C.java | 11 ++- .../plot/config/Configuration.java | 5 +- .../plot/config/ConfigurationNode.java | 10 +-- .../plot/config/Settings.java | 1 - .../plot/database/AbstractDB.java | 14 ++-- .../plot/database/DBFunc.java | 14 ++-- .../plot/database/Database.java | 4 +- .../plot/database/MySQL.java | 8 +- .../plot/database/SQLManager.java | 26 ++++-- .../plot/database/SQLite.java | 10 ++- .../plot/events/PlayerClaimPlotEvent.java | 3 +- .../plot/events/PlayerEnterPlotEvent.java | 3 +- .../plot/events/PlayerLeavePlotEvent.java | 3 +- .../plot/events/PlayerPlotDeniedEvent.java | 5 +- .../plot/events/PlayerPlotHelperEvent.java | 5 +- .../plot/events/PlayerPlotTrustedEvent.java | 5 +- .../events/PlayerTeleportToPlotEvent.java | 3 +- .../plot/events/PlotClearEvent.java | 3 +- .../plot/events/PlotDeleteEvent.java | 3 +- .../plot/events/PlotFlagAddEvent.java | 5 +- .../plot/events/PlotFlagRemoveEvent.java | 5 +- .../plot/events/PlotMergeEvent.java | 7 +- .../plot/events/PlotUnlinkEvent.java | 5 +- .../plot/flag/FlagManager.java | 26 +++--- .../plot/generator/HybridGen.java | 20 ++--- .../plot/generator/HybridPlotManager.java | 34 ++++---- .../plot/generator/HybridPlotWorld.java | 6 +- .../plot/generator/HybridPop.java | 12 +-- .../plot/listeners/ForceFieldListener.java | 10 +-- .../plot/listeners/InventoryListener.java | 5 +- .../plot/listeners/PlayerEvents.java | 61 ++++++++++---- .../plot/listeners/PlotListener.java | 31 ++++--- .../plot/listeners/PlotPlusListener.java | 27 ++++-- .../plot/listeners/WorldEditListener.java | 15 ---- .../plot/listeners/WorldGuardListener.java | 25 +++--- .../plot/object/BlockLoc.java | 2 - .../plot/object/BlockWrapper.java | 5 +- .../plot/object/InfoInventory.java | 8 +- .../plot/object/Plot.java | 18 ++-- .../plot/object/PlotGenerator.java | 3 +- .../plot/object/PlotManager.java | 4 +- .../plot/object/PlotSelection.java | 7 +- .../plot/object/PlotSettings.java | 14 ++-- .../plot/object/PlotWorld.java | 19 ++--- .../plot/object/RegionWrapper.java | 1 - .../plot/object/StringWrapper.java | 1 - .../plot/object/Title.java | 8 +- .../plot/util/Logger.java | 12 ++- .../plot/util/Metrics.java | 31 ++++--- .../intellectualcrafters/plot/util/PWE.java | 8 +- .../plot/util/PlayerFunctions.java | 19 +++-- .../plot/util/PlotHelper.java | 35 +++++--- .../plot/util/RUtils.java | 5 +- .../plot/util/ReflectionUtils.java | 6 +- .../plot/util/SchematicHandler.java | 36 +++++--- .../plot/util/SendChunk.java | 15 ++-- .../plot/util/SetBlockFast.java | 11 +-- .../plot/util/UUIDHandler.java | 4 - .../plot/uuid/DefaultUUIDWrapper.java | 4 +- .../plot/uuid/OfflineUUIDWrapper.java | 11 +-- .../plot/uuid/UUIDWrapper.java | 4 +- .../translation/TranslationManager.java | 6 +- .../translation/TranslationObject.java | 3 +- .../translation/YamlTranslationFile.java | 6 +- .../translation/bukkit/BukkitTranslation.java | 9 +- .../translation/bukkit/TranslationPlugin.java | 9 +- PlotSquared/src/test/java/Test1.java | 28 ++++--- 126 files changed, 785 insertions(+), 660 deletions(-) diff --git a/PlotSquared/pom.xml b/PlotSquared/pom.xml index ec54b925d..efca84a27 100644 --- a/PlotSquared/pom.xml +++ b/PlotSquared/pom.xml @@ -4,9 +4,11 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.intellectualcrafters - + + UTF-8 + PlotSquared - 2.5.8 + 2.5.10 PlotSquared jar diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/jnbt/CompoundTagBuilder.java b/PlotSquared/src/main/java/com/intellectualcrafters/jnbt/CompoundTagBuilder.java index 0a0e6bd36..365b7322a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/jnbt/CompoundTagBuilder.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/jnbt/CompoundTagBuilder.java @@ -1,10 +1,10 @@ package com.intellectualcrafters.jnbt; +import static com.google.common.base.Preconditions.checkNotNull; + import java.util.HashMap; import java.util.Map; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Helps create compound tags. */ diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/jnbt/ListTag.java b/PlotSquared/src/main/java/com/intellectualcrafters/jnbt/ListTag.java index e4ce732c7..434f1a95a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/jnbt/ListTag.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/jnbt/ListTag.java @@ -1,11 +1,12 @@ package com.intellectualcrafters.jnbt; -import javax.annotation.Nullable; +import static com.google.common.base.Preconditions.checkNotNull; + import java.util.Collections; import java.util.List; import java.util.NoSuchElementException; -import static com.google.common.base.Preconditions.checkNotNull; +import javax.annotation.Nullable; /** * The {@code TAG_List} tag. diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/jnbt/ListTagBuilder.java b/PlotSquared/src/main/java/com/intellectualcrafters/jnbt/ListTagBuilder.java index 1c1ba5339..42992d2e6 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/jnbt/ListTagBuilder.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/jnbt/ListTagBuilder.java @@ -1,12 +1,12 @@ package com.intellectualcrafters.jnbt; +import static com.google.common.base.Preconditions.checkNotNull; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; -import static com.google.common.base.Preconditions.checkNotNull; - /** * Helps create list tags. */ diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/json/JSONObject.java b/PlotSquared/src/main/java/com/intellectualcrafters/json/JSONObject.java index eca997fc6..0f98b9388 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/json/JSONObject.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/json/JSONObject.java @@ -6,8 +6,15 @@ import java.io.Writer; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.util.*; +import java.util.Collection; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Locale; +import java.util.Map; import java.util.Map.Entry; +import java.util.ResourceBundle; +import java.util.Set; /** * A JSONObject is an unordered collection of name/value pairs. Its external form is a string wrapped in curly braces diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/json/JSONTokener.java b/PlotSquared/src/main/java/com/intellectualcrafters/json/JSONTokener.java index 16feba806..7c465319a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/json/JSONTokener.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/json/JSONTokener.java @@ -1,6 +1,11 @@ package com.intellectualcrafters.json; -import java.io.*; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.io.StringReader; /** * A JSONTokener takes a source string and extracts characters and tokens from it. It is used by the JSONObject and diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java index 67c7cafa1..d5ef44f40 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java @@ -65,7 +65,7 @@ import org.bukkit.plugin.Plugin; import org.bukkit.plugin.RegisteredServiceProvider; import org.bukkit.plugin.java.JavaPlugin; -import com.google.common.io.Files; +import com.intellectualcrafters.plot.commands.Buy; import com.intellectualcrafters.plot.commands.MainCommand; import com.intellectualcrafters.plot.commands.WE_Anywhere; import com.intellectualcrafters.plot.config.C; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java index ee2ded3ec..8b985a9d2 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java @@ -21,6 +21,16 @@ package com.intellectualcrafters.plot.api; +import java.util.ArrayList; +import java.util.Set; + +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.commands.MainCommand; import com.intellectualcrafters.plot.commands.SubCommand; @@ -31,17 +41,11 @@ import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotManager; import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.util.*; -import com.sun.istack.internal.NotNull; -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.World; -import org.bukkit.configuration.file.YamlConfiguration; -import org.bukkit.entity.Player; -import org.bukkit.plugin.java.JavaPlugin; - -import java.util.ArrayList; -import java.util.Set; +import com.intellectualcrafters.plot.util.PlayerFunctions; +import com.intellectualcrafters.plot.util.PlotHelper; +import com.intellectualcrafters.plot.util.PlotSquaredException; +import com.intellectualcrafters.plot.util.SchematicHandler; +import com.intellectualcrafters.plot.util.UUIDHandler; /** * PlotSquared API @@ -120,7 +124,7 @@ import java.util.Set; * instance * @see com.intellectualcrafters.plot.PlotMain */ - public PlotAPI(@NotNull final JavaPlugin plugin) { + public PlotAPI(final JavaPlugin plugin) { this.plotMain = PlotMain.getMain(); if (this.plotMain == null) { throw new PlotSquaredException(PlotSquaredException.PlotError.PLOTMAIN_NULL, "Failed to fetch the plotmain instance, Plot API for " + plugin.getName() + " will be disabled"); @@ -145,7 +149,7 @@ import java.util.Set; * * @return all plots that a player owns */ - public Set getPlayerPlots(@NotNull final Player player) { + public Set getPlayerPlots(final Player player) { return PlotMain.getPlots(player); } @@ -159,7 +163,7 @@ import java.util.Set; * @see com.intellectualcrafters.plot.PlotMain#addPlotWorld(String, com.intellectualcrafters.plot.object.PlotWorld, * com.intellectualcrafters.plot.object.PlotManager) */ - public void addPlotWorld(@NotNull final String world, @NotNull final PlotWorld plotWorld, @NotNull final PlotManager manager) { + public void addPlotWorld(final String world, final PlotWorld plotWorld, final PlotManager manager) { PlotMain.addPlotWorld(world, plotWorld, manager); } @@ -258,7 +262,7 @@ import java.util.Set; * @see com.intellectualcrafters.plot.object.PlotManager * @see PlotMain#getPlotManager(org.bukkit.World) */ - public PlotManager getPlotManager(@NotNull final World world) { + public PlotManager getPlotManager(final World world) { return PlotMain.getPlotManager(world); } @@ -273,7 +277,7 @@ import java.util.Set; * @see PlotMain#getPlotManager(String) * @see com.intellectualcrafters.plot.object.PlotManager */ - public PlotManager getPlotManager(@NotNull final String world) { + public PlotManager getPlotManager(final String world) { return PlotMain.getPlotManager(world); } @@ -288,7 +292,7 @@ import java.util.Set; * @see PlotMain#getWorldSettings(org.bukkit.World) * @see com.intellectualcrafters.plot.object.PlotWorld */ - public PlotWorld getWorldSettings(@NotNull final World world) { + public PlotWorld getWorldSettings(final World world) { return PlotMain.getWorldSettings(world); } @@ -302,7 +306,7 @@ import java.util.Set; * @see PlotMain#getWorldSettings(String) * @see com.intellectualcrafters.plot.object.PlotWorld */ - public PlotWorld getWorldSettings(@NotNull final String world) { + public PlotWorld getWorldSettings(final String world) { return PlotMain.getWorldSettings(world); } @@ -315,7 +319,7 @@ import java.util.Set; * @see com.intellectualcrafters.plot.util.PlayerFunctions#sendMessage(org.bukkit.entity.Player, * com.intellectualcrafters.plot.config.C, String...) */ - public void sendMessage(@NotNull final Player player, @NotNull final C c) { + public void sendMessage(final Player player, final C c) { PlayerFunctions.sendMessage(player, c); } @@ -327,7 +331,7 @@ import java.util.Set; * * @see com.intellectualcrafters.plot.util.PlayerFunctions#sendMessage(org.bukkit.entity.Player, String) */ - public void sendMessage(@NotNull final Player player, @NotNull final String string) { + public void sendMessage(final Player player, final String string) { PlayerFunctions.sendMessage(player, string); } @@ -338,7 +342,7 @@ import java.util.Set; * * @see PlotMain#sendConsoleSenderMessage(String) */ - public void sendConsoleMessage(@NotNull final String msg) { + public void sendConsoleMessage(final String msg) { PlotMain.sendConsoleSenderMessage(msg); } @@ -350,7 +354,7 @@ import java.util.Set; * @see #sendConsoleMessage(String) * @see com.intellectualcrafters.plot.config.C */ - public void sendConsoleMessage(@NotNull final C c) { + public void sendConsoleMessage(final C c) { sendConsoleMessage(c.s()); } @@ -362,7 +366,7 @@ import java.util.Set; * @see com.intellectualcrafters.plot.flag.FlagManager#addFlag(com.intellectualcrafters.plot.flag.AbstractFlag) * @see com.intellectualcrafters.plot.flag.AbstractFlag */ - public void addFlag(@NotNull final AbstractFlag flag) { + public void addFlag(final AbstractFlag flag) { FlagManager.addFlag(flag); } @@ -390,7 +394,7 @@ import java.util.Set; * @see PlotHelper#getPlot(org.bukkit.World, com.intellectualcrafters.plot.object.PlotId) * @see com.intellectualcrafters.plot.object.Plot */ - public Plot getPlot(@NotNull final World world, final int x, final int z) { + public Plot getPlot(final World world, final int x, final int z) { return PlotHelper.getPlot(world, new PlotId(x, z)); } @@ -404,7 +408,7 @@ import java.util.Set; * @see PlotHelper#getCurrentPlot(org.bukkit.Location) * @see com.intellectualcrafters.plot.object.Plot */ - public Plot getPlot(@NotNull final Location l) { + public Plot getPlot(final Location l) { return PlotHelper.getCurrentPlot(l); } @@ -418,7 +422,7 @@ import java.util.Set; * @see #getPlot(org.bukkit.Location) * @see com.intellectualcrafters.plot.object.Plot */ - public Plot getPlot(@NotNull final Player player) { + public Plot getPlot(final Player player) { return this.getPlot(player.getLocation()); } @@ -431,7 +435,7 @@ import java.util.Set; * * @see #getPlots(org.bukkit.World, org.bukkit.entity.Player, boolean) */ - public boolean hasPlot(@NotNull final World world, @NotNull final Player player) { + public boolean hasPlot(final World world, final Player player) { return (getPlots(world, player, true) != null) && (getPlots(world, player, true).length > 0); } @@ -443,7 +447,7 @@ import java.util.Set; * * @see com.intellectualcrafters.plot.object.Plot */ - public Plot[] getPlots(@NotNull final World world, @NotNull final Player plr, final boolean just_owner) { + public Plot[] getPlots(final World world, final Player plr, final boolean just_owner) { final ArrayList pPlots = new ArrayList<>(); for (final Plot plot : PlotMain.getPlots(world).values()) { if (just_owner) { @@ -469,7 +473,7 @@ import java.util.Set; * @see PlotMain#getWorldPlots(org.bukkit.World) * @see com.intellectualcrafters.plot.object.Plot */ - public Plot[] getPlots(@NotNull final World world) { + public Plot[] getPlots(final World world) { return PlotMain.getWorldPlots(world); } @@ -493,7 +497,7 @@ import java.util.Set; * * @see com.intellectualcrafters.plot.PlotMain#isPlotWorld(org.bukkit.World) */ - public boolean isPlotWorld(@NotNull final World world) { + public boolean isPlotWorld(final World world) { return PlotMain.isPlotWorld(world); } @@ -513,7 +517,7 @@ import java.util.Set; * @see com.intellectualcrafters.plot.object.PlotHomePosition * @see com.intellectualcrafters.plot.object.Plot */ - public Location[] getLocations(@NotNull final Plot p) { + public Location[] getLocations(final Plot p) { final World world = Bukkit.getWorld(p.world); return new Location[]{PlotHelper.getPlotBottomLoc(world, p.id), PlotHelper.getPlotTopLoc(world, p.id), PlotHelper.getPlotHome(world, p.id)}; } @@ -530,7 +534,7 @@ import java.util.Set; * @see com.intellectualcrafters.plot.object.PlotHomePosition * @see com.intellectualcrafters.plot.object.Plot */ - public Location getHomeLocation(@NotNull final Plot p) { + public Location getHomeLocation(final Plot p) { return PlotHelper.getPlotHome(p.getWorld(), p.id); } @@ -545,7 +549,7 @@ import java.util.Set; * com.intellectualcrafters.plot.object.PlotId) * @see com.intellectualcrafters.plot.object.Plot */ - public Location getBottomLocation(@NotNull final Plot p) { + public Location getBottomLocation(final Plot p) { final World world = Bukkit.getWorld(p.world); return PlotHelper.getPlotBottomLoc(world, p.id); } @@ -560,7 +564,7 @@ import java.util.Set; * @see PlotHelper#getPlotTopLoc(org.bukkit.World, com.intellectualcrafters.plot.object.PlotId) * @see com.intellectualcrafters.plot.object.Plot */ - public Location getTopLocation(@NotNull final Plot p) { + public Location getTopLocation(final Plot p) { final World world = Bukkit.getWorld(p.world); return PlotHelper.getPlotTopLoc(world, p.id); } @@ -574,7 +578,7 @@ import java.util.Set; * * @see com.intellectualcrafters.plot.util.PlayerFunctions#isInPlot(org.bukkit.entity.Player) */ - public boolean isInPlot(@NotNull final Player player) { + public boolean isInPlot(final Player player) { return PlayerFunctions.isInPlot(player); } @@ -586,7 +590,7 @@ import java.util.Set; * @see com.intellectualcrafters.plot.commands.MainCommand#subCommands * @see com.intellectualcrafters.plot.commands.SubCommand */ - public void registerCommand(@NotNull final SubCommand c) { + public void registerCommand(final SubCommand c) { MainCommand.subCommands.add(c); } @@ -612,7 +616,7 @@ import java.util.Set; * @see com.intellectualcrafters.plot.util.PlayerFunctions#getPlayerPlotCount(org.bukkit.World, * org.bukkit.entity.Player) */ - public int getPlayerPlotCount(@NotNull final World world, @NotNull final Player player) { + public int getPlayerPlotCount(final World world, final Player player) { return PlayerFunctions.getPlayerPlotCount(world, player); } @@ -628,7 +632,7 @@ import java.util.Set; * org.bukkit.entity.Player) * @see com.intellectualcrafters.plot.object.Plot */ - public Set getPlayerPlots(@NotNull final World world, @NotNull final Player player) { + public Set getPlayerPlots(final World world, final Player player) { return PlayerFunctions.getPlayerPlots(world, player); } @@ -641,7 +645,7 @@ import java.util.Set; * * @see com.intellectualcrafters.plot.util.PlayerFunctions#getAllowedPlots(org.bukkit.entity.Player) */ - public int getAllowedPlots(@NotNull final Player player) { + public int getAllowedPlots(final Player player) { return PlayerFunctions.getAllowedPlots(player); } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java index a7d17fc7d..bd58b8b24 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java @@ -21,21 +21,20 @@ package com.intellectualcrafters.plot.commands; +import net.milkbowl.vault.economy.Economy; + +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; -import net.milkbowl.vault.economy.Economy; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.entity.Player; @SuppressWarnings("deprecation") public class Auto extends SubCommand { public static PlotId lastPlot = new PlotId(0, 0); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java index 5a546b4bd..2bba9b915 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java @@ -1,9 +1,10 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.bukkit.entity.Player; /** * Created 2014-11-09 for PlotSquared diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Buy.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Buy.java index bc0d35542..9a3f30d81 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Buy.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Buy.java @@ -21,28 +21,23 @@ package com.intellectualcrafters.plot.commands; +import net.milkbowl.vault.economy.Economy; + +import org.bukkit.World; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.events.PlayerClaimPlotEvent; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.generator.HybridPlotWorld; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; -import com.intellectualcrafters.plot.util.SchematicHandler; -import com.intellectualcrafters.plot.util.SetBlockFast; import com.intellectualcrafters.plot.util.UUIDHandler; -import net.milkbowl.vault.economy.Economy; - -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.entity.Player; - /** * @author Citymonstret */ diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java index 470353ca4..dd602e141 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java @@ -21,12 +21,14 @@ package com.intellectualcrafters.plot.commands; +import net.milkbowl.vault.economy.Economy; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.events.PlayerClaimPlotEvent; -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.generator.HybridPlotWorld; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotWorld; @@ -35,11 +37,6 @@ import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.SchematicHandler; import com.intellectualcrafters.plot.util.SetBlockFast; -import net.milkbowl.vault.economy.Economy; - -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; - /** * @author Citymonstret */ diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clear.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clear.java index dfa5ebf69..e52570c5a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clear.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clear.java @@ -21,6 +21,9 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; @@ -28,8 +31,6 @@ import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; public class Clear extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clipboard.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clipboard.java index 060f632ed..90245da2f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clipboard.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clipboard.java @@ -21,13 +21,14 @@ package com.intellectualcrafters.plot.commands; +import static com.intellectualcrafters.plot.object.PlotSelection.currentSelection; + +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotSelection; import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.bukkit.entity.Player; - -import static com.intellectualcrafters.plot.object.PlotSelection.currentSelection; public class Clipboard extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CommandPermission.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CommandPermission.java index e1790b321..49b519f95 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CommandPermission.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CommandPermission.java @@ -21,9 +21,10 @@ package com.intellectualcrafters.plot.commands; -import com.intellectualcrafters.plot.PlotMain; import org.bukkit.entity.Player; +import com.intellectualcrafters.plot.PlotMain; + /** * Created by Citymonstret on 2014-08-03. * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Comment.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Comment.java index 087941187..b17661a97 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Comment.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Comment.java @@ -21,17 +21,18 @@ package com.intellectualcrafters.plot.commands; +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.lang.StringUtils; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotComment; import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.apache.commons.lang.StringUtils; -import org.bukkit.entity.Player; - -import java.util.Arrays; -import java.util.List; public class Comment extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java index 7c1731d88..8cca3264e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java @@ -21,6 +21,8 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; @@ -29,8 +31,6 @@ import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.entity.Player; - public class Copy extends SubCommand { public Copy() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java index 86fc194fb..b601748d1 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java @@ -21,26 +21,15 @@ package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; +import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.generator.HybridPlotManager; import com.intellectualcrafters.plot.generator.HybridPlotWorld; -import com.intellectualcrafters.plot.object.ChunkLoc; import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.PlayerFunctions; -import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.SetBlockFast; -import com.intellectualcrafters.plot.util.UUIDHandler; - -import org.bukkit.Bukkit; -import org.bukkit.Chunk; -import org.bukkit.World; -import org.bukkit.entity.Player; public class CreateRoadSchematic extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DEOP.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DEOP.java index 1d0588ad8..c48982e6f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DEOP.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DEOP.java @@ -1,9 +1,10 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.bukkit.entity.Player; /** * Created 2014-11-09 for PlotSquared diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Database.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Database.java index 4713fa2bb..9243e9941 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Database.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Database.java @@ -1,5 +1,15 @@ package com.intellectualcrafters.plot.commands; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.UUID; + +import org.bukkit.entity.Player; +import org.bukkit.plugin.Plugin; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.database.MySQL; import com.intellectualcrafters.plot.database.SQLManager; @@ -7,15 +17,6 @@ import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.StringComparison; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.UUID; /** * Created 2014-11-15 for PlotSquared diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java index 1d871ec67..937e2bf6c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java @@ -21,15 +21,16 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.util.Lag; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.RUtils; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.entity.Player; public class Debug extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java index 39c37cdb3..205639a31 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java @@ -21,16 +21,8 @@ package com.intellectualcrafters.plot.commands; -import com.google.common.collect.BiMap; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.events.PlayerClaimPlotEvent; -import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.object.*; -import com.intellectualcrafters.plot.util.PlayerFunctions; -import com.intellectualcrafters.plot.util.PlotHelper; -import com.intellectualcrafters.plot.util.UUIDHandler; +import java.util.ArrayList; +import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.Chunk; @@ -40,8 +32,19 @@ import org.bukkit.block.Block; import org.bukkit.block.Sign; import org.bukkit.entity.Player; -import java.util.ArrayList; -import java.util.UUID; +import com.google.common.collect.BiMap; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.database.DBFunc; +import com.intellectualcrafters.plot.events.PlayerClaimPlotEvent; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.object.PlotManager; +import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.object.StringWrapper; +import com.intellectualcrafters.plot.util.PlayerFunctions; +import com.intellectualcrafters.plot.util.PlotHelper; +import com.intellectualcrafters.plot.util.UUIDHandler; /** * @author Citymonstret diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java index d786c0735..1164e7879 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java @@ -21,20 +21,19 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.generator.HybridPlotManager; import com.intellectualcrafters.plot.generator.HybridPlotWorld; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; - public class DebugClear extends SubCommand { public DebugClear() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java index 1aeea4257..c8294ea6a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java @@ -21,13 +21,13 @@ package com.intellectualcrafters.plot.commands; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.util.PlayerFunctions; +import java.lang.reflect.Field; import org.bukkit.entity.Player; -import java.lang.reflect.Field; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.database.DBFunc; +import com.intellectualcrafters.plot.util.PlayerFunctions; /** * @author Citymonstret diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java index 27f6df2cf..74f22255f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java @@ -21,15 +21,15 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.Chunk; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.generator.HybridPlotManager; import com.intellectualcrafters.plot.generator.HybridPlotWorld; import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.bukkit.Chunk; -import org.bukkit.entity.Player; - public class DebugRoadRegen extends SubCommand { public DebugRoadRegen() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java index e27261efc..4f8417658 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java @@ -21,15 +21,15 @@ package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; + +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.bukkit.entity.Player; - -import java.util.ArrayList; - /** * @author Citymonstret */ diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Delete.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Delete.java index a187fd1ec..978b36a31 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Delete.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Delete.java @@ -21,6 +21,10 @@ package com.intellectualcrafters.plot.commands; +import net.milkbowl.vault.economy.Economy; + +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -28,8 +32,6 @@ import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.UUIDHandler; -import net.milkbowl.vault.economy.Economy; -import org.bukkit.entity.Player; public class Delete extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java index d352672ad..5a8a1881f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java @@ -21,6 +21,12 @@ package com.intellectualcrafters.plot.commands; +import java.util.UUID; + +import org.bukkit.Bukkit; +import org.bukkit.OfflinePlayer; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -28,11 +34,6 @@ import com.intellectualcrafters.plot.events.PlayerPlotDeniedEvent; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.Bukkit; -import org.bukkit.OfflinePlayer; -import org.bukkit.entity.Player; - -import java.util.UUID; @SuppressWarnings("deprecation") public class Denied extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java index 6e96ac107..6d2b5dab0 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java @@ -21,6 +21,12 @@ package com.intellectualcrafters.plot.commands; +import java.util.UUID; + +import org.bukkit.Bukkit; +import org.bukkit.OfflinePlayer; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -28,11 +34,6 @@ import com.intellectualcrafters.plot.events.PlayerPlotHelperEvent; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.Bukkit; -import org.bukkit.OfflinePlayer; -import org.bukkit.entity.Player; - -import java.util.UUID; @SuppressWarnings("deprecation") public class Helpers extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java index 16b7d8869..99e0cb223 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java @@ -21,14 +21,14 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.entity.Player; - /** * @author Citymonstret */ diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java index 6feb74467..03408a1b7 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java @@ -21,6 +21,14 @@ package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -29,14 +37,6 @@ import com.intellectualcrafters.plot.object.PlotComment; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - public class Inbox extends SubCommand { public Inbox() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java index fc217beb2..ace537398 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java @@ -21,6 +21,16 @@ package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; +import java.util.UUID; + +import org.apache.commons.lang.StringUtils; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.block.Biome; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -33,16 +43,6 @@ import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.apache.commons.lang.StringUtils; -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.World; -import org.bukkit.block.Biome; -import org.bukkit.entity.Player; - -import java.util.ArrayList; -import java.util.UUID; - /** * @author Citymonstret */ diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inventory.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inventory.java index 326ffea40..4921d16ac 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inventory.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inventory.java @@ -21,6 +21,8 @@ package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; + import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -28,8 +30,6 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import java.util.ArrayList; - public class Inventory extends SubCommand { public Inventory() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java index fcf20886e..6c083384f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java @@ -21,15 +21,15 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; - @SuppressWarnings({"unused", "deprecation", "javadoc"}) public class Kick extends SubCommand { public Kick() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java index ea9149cd3..cbce58838 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java @@ -21,10 +21,10 @@ package com.intellectualcrafters.plot.commands; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.util.PlayerFunctions; -import com.intellectualcrafters.plot.util.StringComparison; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -32,9 +32,10 @@ import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; import org.bukkit.entity.Player; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.util.PlayerFunctions; +import com.intellectualcrafters.plot.util.StringComparison; /** * PlotMain command class diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Merge.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Merge.java index 844ef7249..3a6b86282 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Merge.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Merge.java @@ -21,6 +21,15 @@ package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; + +import net.milkbowl.vault.economy.Economy; + +import org.apache.commons.lang.StringUtils; +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.events.PlotMergeEvent; @@ -32,15 +41,6 @@ import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.SetBlockFast; import com.intellectualcrafters.plot.util.UUIDHandler; -import net.milkbowl.vault.economy.Economy; - -import org.apache.commons.lang.StringUtils; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.entity.Player; - -import java.util.ArrayList; - /** * @author Citymonstret */ diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java index 426dc02af..b8622f16c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java @@ -21,17 +21,18 @@ package com.intellectualcrafters.plot.commands; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.listeners.PlotPlusListener; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.util.PlayerFunctions; +import java.util.Arrays; + import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import java.util.Arrays; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.listeners.PlotPlusListener; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.util.PlayerFunctions; public class MusicSubcommand extends SubCommand { public MusicSubcommand() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/OP.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/OP.java index 406586f5e..67d789621 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/OP.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/OP.java @@ -1,9 +1,10 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.bukkit.entity.Player; /** * Created 2014-11-09 for PlotSquared diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Paste.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Paste.java index 4a8121be7..70b21bee3 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Paste.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Paste.java @@ -21,6 +21,8 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; @@ -29,8 +31,6 @@ import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.entity.Player; - public class Paste extends SubCommand { public Paste() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java index 227be2d2b..ee08ead9e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java @@ -22,11 +22,14 @@ package com.intellectualcrafters.plot.commands; import java.util.Collection; -import java.util.HashMap; import java.util.HashSet; import java.util.Set; import java.util.UUID; +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -35,10 +38,6 @@ import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.entity.Player; - @SuppressWarnings({"unused", "deprecated", "javadoc"}) public class Purge extends SubCommand { public Purge() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Rate.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Rate.java index d05c1d27c..e3705a4ea 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Rate.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Rate.java @@ -21,14 +21,14 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.entity.Player; - @SuppressWarnings({"unused", "deprecated", "javadoc"}) public class Rate extends SubCommand { /* diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java index 78f5da6e9..1229f1893 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java @@ -23,23 +23,15 @@ package com.intellectualcrafters.plot.commands; import java.util.ArrayList; +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.generator.HybridPlotManager; -import com.intellectualcrafters.plot.generator.HybridPlotWorld; import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.util.PlayerFunctions; -import com.intellectualcrafters.plot.util.PlotHelper; -import com.intellectualcrafters.plot.util.UUIDHandler; - -import org.bukkit.Bukkit; -import org.bukkit.Chunk; -import org.bukkit.World; -import org.bukkit.entity.Player; public class RegenAllRoads extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java index d0cda4684..b8da135a0 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java @@ -21,11 +21,12 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.bukkit.entity.Player; public class Reload extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Schematic.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Schematic.java index b334962c4..cddf9ecca 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Schematic.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Schematic.java @@ -21,23 +21,28 @@ package com.intellectualcrafters.plot.commands; -import com.intellectualcrafters.jnbt.CompoundTag; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.util.*; -import com.intellectualcrafters.plot.util.SchematicHandler.DataCollection; -import com.intellectualcrafters.plot.util.SchematicHandler.Dimension; +import java.util.Collection; +import java.util.HashMap; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; -import java.util.Collection; -import java.util.HashMap; +import com.intellectualcrafters.jnbt.CompoundTag; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.config.Settings; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.util.PlayerFunctions; +import com.intellectualcrafters.plot.util.PlotHelper; +import com.intellectualcrafters.plot.util.SchematicHandler; +import com.intellectualcrafters.plot.util.SchematicHandler.DataCollection; +import com.intellectualcrafters.plot.util.SchematicHandler.Dimension; +import com.intellectualcrafters.plot.util.SetBlockFast; +import com.intellectualcrafters.plot.util.UUIDHandler; public class Schematic extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java index 694a3dc4e..4cb1ba231 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java @@ -21,11 +21,22 @@ package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.lang.StringUtils; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.block.Biome; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.events.PlotFlagAddEvent; -import com.intellectualcrafters.plot.events.PlotFlagRemoveEvent; import com.intellectualcrafters.plot.flag.AbstractFlag; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; @@ -38,19 +49,6 @@ import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.StringComparison; -import org.apache.commons.lang.StringUtils; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.World; -import org.bukkit.block.Biome; -import org.bukkit.entity.Player; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - /** * @author Citymonstret */ diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java index 07f92267a..de8cf2b15 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java @@ -21,6 +21,12 @@ package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; +import java.util.UUID; + +import org.bukkit.World; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -29,11 +35,6 @@ import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.World; -import org.bukkit.entity.Player; - -import java.util.ArrayList; -import java.util.UUID; @SuppressWarnings("deprecation") public class SetOwner extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Setup.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Setup.java index f73a9d221..b3e8c38cc 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Setup.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Setup.java @@ -21,6 +21,20 @@ package com.intellectualcrafters.plot.commands; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang.StringUtils; +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.WorldCreator; +import org.bukkit.entity.Player; +import org.bukkit.event.Listener; +import org.bukkit.generator.ChunkGenerator; +import org.bukkit.plugin.Plugin; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.ConfigurationNode; @@ -29,21 +43,6 @@ import com.intellectualcrafters.plot.object.PlotGenerator; import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.apache.commons.lang.StringUtils; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.WorldCreator; -import org.bukkit.configuration.InvalidConfigurationException; -import org.bukkit.entity.Player; -import org.bukkit.event.Listener; -import org.bukkit.generator.ChunkGenerator; -import org.bukkit.plugin.Plugin; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - /** * Created 2014-09-26 for PlotSquared * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SubCommand.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SubCommand.java index 4d157620e..027e4a78e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SubCommand.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SubCommand.java @@ -21,13 +21,14 @@ package com.intellectualcrafters.plot.commands; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.bukkit.entity.Player; - import java.util.ArrayList; import java.util.Arrays; +import org.bukkit.entity.Player; + +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.util.PlayerFunctions; + /** * SubCommand class * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Swap.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Swap.java index 8ba07ff4b..cc765ce96 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Swap.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Swap.java @@ -21,6 +21,9 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.World; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; @@ -31,9 +34,6 @@ import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.SetBlockFast; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.World; -import org.bukkit.entity.Player; - /** * Created 2014-08-01 for PlotSquared * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/TP.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/TP.java index 7487451fe..9e491e771 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/TP.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/TP.java @@ -21,16 +21,17 @@ package com.intellectualcrafters.plot.commands; +import org.apache.commons.lang.StringUtils; +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; -import org.apache.commons.lang.StringUtils; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.entity.Player; /** * @author Citymonstret diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trim.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trim.java index 62484da7f..4a57d532e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trim.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trim.java @@ -22,43 +22,36 @@ package com.intellectualcrafters.plot.commands; import java.io.File; -import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.attribute.BasicFileAttributes; -import java.nio.file.attribute.FileTime; import java.util.ArrayList; import java.util.Collection; -import java.util.HashMap; import java.util.HashSet; import java.util.Set; import java.util.UUID; import java.util.concurrent.TimeUnit; +import org.bukkit.Bukkit; +import org.bukkit.Chunk; +import org.bukkit.OfflinePlayer; +import org.bukkit.World; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.generator.HybridPlotManager; import com.intellectualcrafters.plot.generator.HybridPlotWorld; import com.intellectualcrafters.plot.object.ChunkLoc; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotManager; import com.intellectualcrafters.plot.util.ChunkManager; import com.intellectualcrafters.plot.util.PlayerFunctions; -import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.TaskManager; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.Bukkit; -import org.bukkit.Chunk; -import org.bukkit.Location; -import org.bukkit.OfflinePlayer; -import org.bukkit.World; -import org.bukkit.entity.Player; - @SuppressWarnings({"unused", "deprecated", "javadoc"}) public class Trim extends SubCommand { public static boolean TASK = false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java index c119ce819..8a7030f71 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java @@ -21,6 +21,12 @@ package com.intellectualcrafters.plot.commands; +import java.util.UUID; + +import org.bukkit.Bukkit; +import org.bukkit.OfflinePlayer; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -28,11 +34,6 @@ import com.intellectualcrafters.plot.events.PlayerPlotTrustedEvent; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.Bukkit; -import org.bukkit.OfflinePlayer; -import org.bukkit.entity.Player; - -import java.util.UUID; @SuppressWarnings("deprecation") public class Trusted extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unban.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unban.java index 3ce6d2fd2..19ef801e9 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unban.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unban.java @@ -1,9 +1,10 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.bukkit.entity.Player; /** * Created 2014-11-09 for PlotSquared diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java index 134c2db65..594623225 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java @@ -21,6 +21,10 @@ package com.intellectualcrafters.plot.commands; +import net.milkbowl.vault.economy.Economy; + +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -29,10 +33,6 @@ import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.UUIDHandler; -import net.milkbowl.vault.economy.Economy; - -import org.bukkit.entity.Player; - public class Unclaim extends SubCommand { public Unclaim() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java index 6cc2f4d18..ec821f072 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java @@ -21,6 +21,12 @@ package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; + +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -33,11 +39,6 @@ import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.SetBlockFast; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.entity.Player; - -import java.util.ArrayList; /** * Created 2014-08-01 for PlotSquared diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java index 462c4de26..ad4756559 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java @@ -21,15 +21,16 @@ package com.intellectualcrafters.plot.commands; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.entity.Player; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; public class Visit extends SubCommand { public Visit() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java index 1b2a22a83..7c8a166e2 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java @@ -21,12 +21,12 @@ package com.intellectualcrafters.plot.commands; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.util.PWE; import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.bukkit.entity.Player; - public class WE_Anywhere extends SubCommand { public WE_Anywhere() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java index a72a77fa4..1af387afa 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java @@ -21,6 +21,12 @@ package com.intellectualcrafters.plot.commands; +import java.util.HashMap; +import java.util.UUID; + +import org.bukkit.ChatColor; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.flag.Flag; @@ -31,12 +37,6 @@ import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.StringComparison; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.ChatColor; -import org.bukkit.entity.Player; - -import java.util.HashMap; -import java.util.UUID; - /** * @author Citymonstret */ diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java index 61c2a412a..1228a1805 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java @@ -21,18 +21,19 @@ package com.intellectualcrafters.plot.commands; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.util.PlayerFunctions; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.plugin.java.JavaPlugin; - import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; + +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.util.PlayerFunctions; + public class plugin extends SubCommand { public static String downloads, version; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java index 6f152af59..f2f903f7b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java @@ -21,11 +21,16 @@ package com.intellectualcrafters.plot.config; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualsites.translation.*; -import com.intellectualsites.translation.bukkit.BukkitTranslation; import org.bukkit.ChatColor; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualsites.translation.TranslationFile; +import com.intellectualsites.translation.TranslationLanguage; +import com.intellectualsites.translation.TranslationManager; +import com.intellectualsites.translation.TranslationObject; +import com.intellectualsites.translation.YamlTranslationFile; +import com.intellectualsites.translation.bukkit.BukkitTranslation; + /** * Captions class. * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Configuration.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Configuration.java index 098b2f540..f0b7b5b50 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Configuration.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Configuration.java @@ -21,12 +21,11 @@ package com.intellectualcrafters.plot.config; -import com.intellectualcrafters.plot.object.PlotBlock; +import java.util.ArrayList; import org.bukkit.block.Biome; -import java.util.ArrayList; -import java.util.List; +import com.intellectualcrafters.plot.object.PlotBlock; /** * Main Configuration Utility diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/ConfigurationNode.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/ConfigurationNode.java index b35da4ff9..0c0fceca9 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/ConfigurationNode.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/ConfigurationNode.java @@ -21,15 +21,15 @@ package com.intellectualcrafters.plot.config; -import com.intellectualcrafters.plot.config.Configuration.SettingValue; -import com.intellectualcrafters.plot.object.PlotBlock; - -import org.apache.commons.lang.StringUtils; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.apache.commons.lang.StringUtils; + +import com.intellectualcrafters.plot.config.Configuration.SettingValue; +import com.intellectualcrafters.plot.object.PlotBlock; + /** * Configuration Node * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Settings.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Settings.java index 3203373bd..c28eae4d9 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Settings.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Settings.java @@ -21,7 +21,6 @@ package com.intellectualcrafters.plot.config; -import org.bukkit.Bukkit; /** * Updater and DB settings diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/AbstractDB.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/AbstractDB.java index 9e22f4c51..aba6f2e1f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/AbstractDB.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/AbstractDB.java @@ -21,13 +21,6 @@ package com.intellectualcrafters.plot.database; -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotComment; -import com.intellectualcrafters.plot.object.PlotId; - -import org.bukkit.OfflinePlayer; - import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; @@ -35,6 +28,13 @@ import java.util.LinkedHashMap; import java.util.Set; import java.util.UUID; +import org.bukkit.OfflinePlayer; + +import com.intellectualcrafters.plot.flag.Flag; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotComment; +import com.intellectualcrafters.plot.object.PlotId; + /** * @author Citymonstret * @author Empire92 diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/DBFunc.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/DBFunc.java index 4c2e76f64..6f8be1ebf 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/DBFunc.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/DBFunc.java @@ -21,19 +21,19 @@ package com.intellectualcrafters.plot.database; -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotComment; -import com.intellectualcrafters.plot.object.PlotId; - -import org.bukkit.OfflinePlayer; - import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Set; import java.util.UUID; +import org.bukkit.OfflinePlayer; + +import com.intellectualcrafters.plot.flag.Flag; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotComment; +import com.intellectualcrafters.plot.object.PlotId; + /** * DB Functions * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/Database.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/Database.java index 3899ed529..5d45248e1 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/Database.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/Database.java @@ -21,12 +21,12 @@ package com.intellectualcrafters.plot.database; -import org.bukkit.plugin.Plugin; - import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; +import org.bukkit.plugin.Plugin; + /** * Abstract Database class, serves as a base for any connection method (MySQL, SQLite, etc.) * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/MySQL.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/MySQL.java index a8afdfad1..4ba7bc7ad 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/MySQL.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/MySQL.java @@ -21,9 +21,13 @@ package com.intellectualcrafters.plot.database; -import org.bukkit.plugin.Plugin; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; -import java.sql.*; +import org.bukkit.plugin.Plugin; /** * Connects to and uses a MySQL database diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java index b7ce4c65f..383d2b79d 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java @@ -21,6 +21,24 @@ package com.intellectualcrafters.plot.database; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.Set; +import java.util.UUID; + +import org.apache.commons.lang.StringUtils; +import org.bukkit.Bukkit; +import org.bukkit.OfflinePlayer; +import org.bukkit.block.Biome; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; @@ -31,14 +49,6 @@ import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.util.TaskManager; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.apache.commons.lang.StringUtils; -import org.bukkit.Bukkit; -import org.bukkit.OfflinePlayer; -import org.bukkit.block.Biome; - -import java.sql.*; -import java.util.*; - /** * @author Citymonstret */ diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLite.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLite.java index 651216e0d..d029259b5 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLite.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLite.java @@ -21,13 +21,17 @@ package com.intellectualcrafters.plot.database; -import org.bukkit.plugin.Plugin; - import java.io.File; import java.io.IOException; -import java.sql.*; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; import java.util.logging.Level; +import org.bukkit.plugin.Plugin; + /** * Connects to and uses a SQLite database * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerClaimPlotEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerClaimPlotEvent.java index 202267824..5939a8dab 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerClaimPlotEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerClaimPlotEvent.java @@ -21,12 +21,13 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.object.Plot; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; import org.bukkit.event.player.PlayerEvent; +import com.intellectualcrafters.plot.object.Plot; + /** * @author Citymonstret * @author Empire92 diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerEnterPlotEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerEnterPlotEvent.java index 25698112b..6174a8812 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerEnterPlotEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerEnterPlotEvent.java @@ -21,11 +21,12 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.object.Plot; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; import org.bukkit.event.player.PlayerEvent; +import com.intellectualcrafters.plot.object.Plot; + /** * @author Citymonstret * @author Empire92 diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerLeavePlotEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerLeavePlotEvent.java index 0414b0dda..6ae951dbf 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerLeavePlotEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerLeavePlotEvent.java @@ -21,11 +21,12 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.object.Plot; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; import org.bukkit.event.player.PlayerEvent; +import com.intellectualcrafters.plot.object.Plot; + /** * @author Citymonstret * @author Empire92 diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerPlotDeniedEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerPlotDeniedEvent.java index 416f7be7a..5c751aeb0 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerPlotDeniedEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerPlotDeniedEvent.java @@ -21,12 +21,13 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.object.Plot; +import java.util.UUID; + import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -import java.util.UUID; +import com.intellectualcrafters.plot.object.Plot; /** * @author Citymonstret diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerPlotHelperEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerPlotHelperEvent.java index 2cb310f79..d9378c3c9 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerPlotHelperEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerPlotHelperEvent.java @@ -21,12 +21,13 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.object.Plot; +import java.util.UUID; + import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -import java.util.UUID; +import com.intellectualcrafters.plot.object.Plot; /** * @author Empire92 diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerPlotTrustedEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerPlotTrustedEvent.java index 348c2778f..6989b8e45 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerPlotTrustedEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerPlotTrustedEvent.java @@ -21,12 +21,13 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.object.Plot; +import java.util.UUID; + import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -import java.util.UUID; +import com.intellectualcrafters.plot.object.Plot; /** * @author Citymonstret diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerTeleportToPlotEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerTeleportToPlotEvent.java index 792e2f5d3..e3a2ae9a5 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerTeleportToPlotEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerTeleportToPlotEvent.java @@ -21,13 +21,14 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.object.Plot; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; import org.bukkit.event.player.PlayerEvent; +import com.intellectualcrafters.plot.object.Plot; + /** * Called when a player teleports to a plot * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotClearEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotClearEvent.java index 2e24b7dc7..7b238c46a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotClearEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotClearEvent.java @@ -21,11 +21,12 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.object.PlotId; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; +import com.intellectualcrafters.plot.object.PlotId; + /** * Called when a plot is cleared * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotDeleteEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotDeleteEvent.java index 0059b8f7b..5e17845be 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotDeleteEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotDeleteEvent.java @@ -21,11 +21,12 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.object.PlotId; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; +import com.intellectualcrafters.plot.object.PlotId; + /** * Called when a plot is deleted * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotFlagAddEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotFlagAddEvent.java index 89505350a..3e5234cf0 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotFlagAddEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotFlagAddEvent.java @@ -21,12 +21,13 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.object.Plot; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; +import com.intellectualcrafters.plot.flag.Flag; +import com.intellectualcrafters.plot.object.Plot; + /** * Called when a Flag is added to a plot * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotFlagRemoveEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotFlagRemoveEvent.java index 23e99bef4..3272fad58 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotFlagRemoveEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotFlagRemoveEvent.java @@ -21,12 +21,13 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.object.Plot; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; +import com.intellectualcrafters.plot.flag.Flag; +import com.intellectualcrafters.plot.object.Plot; + /** * Called when a flag is removed from a plot * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotMergeEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotMergeEvent.java index ba7395edd..d810c5c73 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotMergeEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotMergeEvent.java @@ -21,14 +21,15 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; +import java.util.ArrayList; + import org.bukkit.World; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -import java.util.ArrayList; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotId; /** * @author Empire92 diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotUnlinkEvent.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotUnlinkEvent.java index 6727ab007..6d03c61d5 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotUnlinkEvent.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlotUnlinkEvent.java @@ -21,13 +21,14 @@ package com.intellectualcrafters.plot.events; -import com.intellectualcrafters.plot.object.PlotId; +import java.util.ArrayList; + import org.bukkit.World; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -import java.util.ArrayList; +import com.intellectualcrafters.plot.object.PlotId; /** * @author Empire92 diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java index 9aa993303..0c47becc2 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java @@ -21,23 +21,21 @@ package com.intellectualcrafters.plot.flag; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.events.PlotFlagAddEvent; import com.intellectualcrafters.plot.events.PlotFlagRemoveEvent; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotWorld; -import com.sun.istack.internal.NotNull; - -import org.apache.commons.lang.StringUtils; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; /** * Flag Manager Utility @@ -75,7 +73,7 @@ import java.util.Set; ArrayList flags = new ArrayList<>(); flags.addAll(plot.settings.flags); PlotWorld plotworld = PlotMain.getWorldSettings(plot.world); - if (plotworld != null) { + if (plotworld != null && plotworld.DEFAULT_FLAGS != null && plotworld.DEFAULT_FLAGS.length > 0) { flags.addAll(Arrays.asList(plotworld.DEFAULT_FLAGS)); } for (final Flag myflag : flags) { @@ -129,7 +127,9 @@ import java.util.Set; public static Set getPlotFlags(Plot plot) { Set plotflags = plot.settings.flags; PlotWorld plotworld = PlotMain.getWorldSettings(plot.world); - plotflags.addAll(Arrays.asList(plotworld.DEFAULT_FLAGS)); + if (plotworld != null && plotworld.DEFAULT_FLAGS != null && plotworld.DEFAULT_FLAGS.length > 0) { + plotflags.addAll(Arrays.asList(plotworld.DEFAULT_FLAGS)); + } return plotflags; } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridGen.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridGen.java index 4a8064eea..c154874d2 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridGen.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridGen.java @@ -21,12 +21,10 @@ package com.intellectualcrafters.plot.generator; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.PlotGenerator; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.RegionWrapper; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Random; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -34,10 +32,12 @@ import org.bukkit.World; import org.bukkit.block.Biome; import org.bukkit.generator.BlockPopulator; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Random; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.object.ChunkLoc; +import com.intellectualcrafters.plot.object.PlotGenerator; +import com.intellectualcrafters.plot.object.PlotManager; +import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.object.RegionWrapper; /** * The default generator is very messy, as we have decided to try externalize all calculations from within the loop. - diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotManager.java index aaa010def..2af0e8c2f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotManager.java @@ -21,21 +21,13 @@ package com.intellectualcrafters.plot.generator; -import com.intellectualcrafters.jnbt.CompoundTag; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.commands.Schematic; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.*; -import com.intellectualcrafters.plot.util.PlayerFunctions; -import com.intellectualcrafters.plot.util.PlotHelper; -import com.intellectualcrafters.plot.util.SchematicHandler; -import com.intellectualcrafters.plot.util.SendChunk; -import com.intellectualcrafters.plot.util.SetBlockFast; +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.Location; -import org.bukkit.Material; import org.bukkit.Note; import org.bukkit.World; import org.bukkit.block.Beacon; @@ -49,14 +41,24 @@ import org.bukkit.block.Furnace; import org.bukkit.block.Hopper; import org.bukkit.block.NoteBlock; import org.bukkit.block.Sign; -import org.bukkit.entity.Entity; import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.Plugin; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; +import com.intellectualcrafters.jnbt.CompoundTag; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.object.BlockLoc; +import com.intellectualcrafters.plot.object.ChunkLoc; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotBlock; +import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.object.PlotManager; +import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.object.RegionWrapper; +import com.intellectualcrafters.plot.util.PlayerFunctions; +import com.intellectualcrafters.plot.util.PlotHelper; +import com.intellectualcrafters.plot.util.SchematicHandler; +import com.intellectualcrafters.plot.util.SendChunk; @SuppressWarnings("deprecation") public class HybridPlotManager extends PlotManager { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotWorld.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotWorld.java index d7f66ec01..a0ddd95a6 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotWorld.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotWorld.java @@ -23,6 +23,9 @@ package com.intellectualcrafters.plot.generator; import java.util.HashMap; +import org.apache.commons.lang.StringUtils; +import org.bukkit.configuration.ConfigurationSection; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Configuration; @@ -35,9 +38,6 @@ import com.intellectualcrafters.plot.util.SchematicHandler.DataCollection; import com.intellectualcrafters.plot.util.SchematicHandler.Dimension; import com.intellectualcrafters.plot.util.SchematicHandler.Schematic; -import org.apache.commons.lang.StringUtils; -import org.bukkit.configuration.ConfigurationSection; - public class HybridPlotWorld extends PlotWorld { /* diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPop.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPop.java index 261a39ce1..00753a977 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPop.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/HybridPop.java @@ -1,17 +1,17 @@ package com.intellectualcrafters.plot.generator; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.RegionWrapper; +import java.util.HashMap; +import java.util.Random; import org.bukkit.Chunk; import org.bukkit.World; import org.bukkit.block.Biome; import org.bukkit.generator.BlockPopulator; -import java.util.HashMap; -import java.util.Random; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.object.ChunkLoc; +import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.object.RegionWrapper; /** * @author Citymonstret diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/ForceFieldListener.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/ForceFieldListener.java index 5d6748ef5..4ee7103d8 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/ForceFieldListener.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/ForceFieldListener.java @@ -21,9 +21,8 @@ package com.intellectualcrafters.plot.listeners; -import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.util.PlayerFunctions; +import java.util.HashSet; +import java.util.Set; import org.bukkit.Location; import org.bukkit.entity.Entity; @@ -34,8 +33,9 @@ import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.util.Vector; -import java.util.HashSet; -import java.util.Set; +import com.intellectualcrafters.plot.flag.FlagManager; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.util.PlayerFunctions; /** * @author Citymonstret diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/InventoryListener.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/InventoryListener.java index d100f6599..149a0ef86 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/InventoryListener.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/InventoryListener.java @@ -1,7 +1,5 @@ package com.intellectualcrafters.plot.listeners; -import com.intellectualcrafters.plot.object.InfoInventory; -import com.intellectualcrafters.plot.util.PlayerFunctions; import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.EventHandler; @@ -10,6 +8,9 @@ import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryInteractEvent; import org.bukkit.inventory.Inventory; +import com.intellectualcrafters.plot.object.InfoInventory; +import com.intellectualcrafters.plot.util.PlayerFunctions; + /** * Created 2014-11-18 for PlotSquared * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java index 547d3f5c4..698942527 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -21,18 +21,15 @@ package com.intellectualcrafters.plot.listeners; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.commands.Setup; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.object.*; -import com.intellectualcrafters.plot.util.PlayerFunctions; -import com.intellectualcrafters.plot.util.PlotHelper; -import com.intellectualcrafters.plot.util.UUIDHandler; +import java.util.List; +import java.util.Set; +import java.util.UUID; -import org.bukkit.*; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; import org.bukkit.block.BlockState; @@ -42,7 +39,18 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.block.*; +import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.block.BlockDamageEvent; +import org.bukkit.event.block.BlockFadeEvent; +import org.bukkit.event.block.BlockFormEvent; +import org.bukkit.event.block.BlockFromToEvent; +import org.bukkit.event.block.BlockGrowEvent; +import org.bukkit.event.block.BlockIgniteEvent; +import org.bukkit.event.block.BlockPistonExtendEvent; +import org.bukkit.event.block.BlockPistonRetractEvent; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.event.block.BlockSpreadEvent; +import org.bukkit.event.block.EntityBlockFormEvent; import org.bukkit.event.entity.CreatureSpawnEvent; import org.bukkit.event.entity.EntityChangeBlockEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent; @@ -50,13 +58,34 @@ import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.hanging.HangingPlaceEvent; import org.bukkit.event.inventory.InventoryClickEvent; -import org.bukkit.event.player.*; +import org.bukkit.event.player.AsyncPlayerChatEvent; +import org.bukkit.event.player.PlayerBucketEmptyEvent; +import org.bukkit.event.player.PlayerBucketFillEvent; +import org.bukkit.event.player.PlayerEggThrowEvent; +import org.bukkit.event.player.PlayerInteractEntityEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.event.player.PlayerMoveEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.event.world.StructureGrowEvent; import org.bukkit.event.world.WorldLoadEvent; -import java.util.List; -import java.util.Set; -import java.util.UUID; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.commands.Setup; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.config.Settings; +import com.intellectualcrafters.plot.database.DBFunc; +import com.intellectualcrafters.plot.flag.FlagManager; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.object.PlotManager; +import com.intellectualcrafters.plot.object.PlotSelection; +import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.object.StringWrapper; +import com.intellectualcrafters.plot.util.PlayerFunctions; +import com.intellectualcrafters.plot.util.PlotHelper; +import com.intellectualcrafters.plot.util.UUIDHandler; /** * Player Events involving plots diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotListener.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotListener.java index 24acc02db..9f9508150 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotListener.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotListener.java @@ -21,26 +21,35 @@ package com.intellectualcrafters.plot.listeners; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.UUID; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.GameMode; +import org.bukkit.Location; +import org.bukkit.WeatherType; +import org.bukkit.World; +import org.bukkit.block.Biome; +import org.bukkit.block.Block; +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.events.PlayerEnterPlotEvent; import com.intellectualcrafters.plot.events.PlayerLeavePlotEvent; import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.object.PlotManager; +import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.object.Title; import com.intellectualcrafters.plot.util.PlayerFunctions; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.*; -import org.bukkit.block.Biome; -import org.bukkit.block.Block; -import org.bukkit.entity.Player; -import org.bukkit.event.Cancellable; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.UUID; - /** * @author Citymonstret * @author Empire92 diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotPlusListener.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotPlusListener.java index 1446d549c..f9e7bda2b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotPlusListener.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotPlusListener.java @@ -21,15 +21,18 @@ package com.intellectualcrafters.plot.listeners; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.events.PlayerEnterPlotEvent; -import com.intellectualcrafters.plot.events.PlayerLeavePlotEvent; -import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.util.PlayerFunctions; -import com.intellectualcrafters.plot.util.UUIDHandler; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; -import org.bukkit.*; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Effect; +import org.bukkit.GameMode; +import org.bukkit.Material; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -43,7 +46,13 @@ import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.plugin.java.JavaPlugin; -import java.util.*; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.events.PlayerEnterPlotEvent; +import com.intellectualcrafters.plot.events.PlayerLeavePlotEvent; +import com.intellectualcrafters.plot.flag.FlagManager; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.util.PlayerFunctions; +import com.intellectualcrafters.plot.util.UUIDHandler; /** * Created 2014-10-30 for PlotSquared diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/WorldEditListener.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/WorldEditListener.java index 7819c8534..297e652fa 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/WorldEditListener.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/WorldEditListener.java @@ -28,13 +28,11 @@ import java.util.Set; import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerChangedWorldEvent; import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerJoinEvent; @@ -57,19 +55,6 @@ import com.sk89q.worldedit.BlockVector; import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.bukkit.selections.Selection; import com.sk89q.worldedit.function.mask.Mask; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.block.Block; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; -import org.bukkit.event.player.*; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; /** * @author Citymonstret diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/WorldGuardListener.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/WorldGuardListener.java index fc19d12b7..8eb677bfa 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/WorldGuardListener.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/WorldGuardListener.java @@ -21,6 +21,18 @@ package com.intellectualcrafters.plot.listeners; +import java.util.ArrayList; +import java.util.Map; +import java.util.UUID; + +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.events.PlayerClaimPlotEvent; import com.intellectualcrafters.plot.events.PlayerPlotHelperEvent; @@ -40,19 +52,6 @@ import com.sk89q.worldguard.protection.managers.RegionManager; import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion; import com.sk89q.worldguard.protection.regions.ProtectedRegion; -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.World; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; -import org.bukkit.permissions.PermissionAttachment; - -import java.util.ArrayList; -import java.util.Map; -import java.util.UUID; - /** * Created 2014-09-24 for PlotSquared * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BlockLoc.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BlockLoc.java index 25fe9fb26..d16e38716 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BlockLoc.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BlockLoc.java @@ -1,7 +1,5 @@ package com.intellectualcrafters.plot.object; -import org.bukkit.Location; -import org.bukkit.World; public class BlockLoc { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BlockWrapper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BlockWrapper.java index 435bf9d1d..39fbeda1a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BlockWrapper.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BlockWrapper.java @@ -21,7 +21,6 @@ package com.intellectualcrafters.plot.object; -import com.sun.istack.internal.NotNull; import org.bukkit.World; import org.bukkit.block.Block; @@ -83,7 +82,7 @@ public class BlockWrapper { * @param block Block from which we get the data */ @SuppressWarnings({"deprecation", "unused"}) - public BlockWrapper(@NotNull final Block block) { + public BlockWrapper(final Block block) { this.x = block.getX(); this.y = block.getY(); this.z = block.getZ(); @@ -99,7 +98,7 @@ public class BlockWrapper { * @return block created/fetched from settings */ @SuppressWarnings({"unused", "deprecation"}) - public Block toBlock(@NotNull final World world) { + public Block toBlock(final World world) { final Block block = world.getBlockAt(this.x, this.y, this.z); block.setTypeIdAndData(this.id, this.data, true); return block; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/InfoInventory.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/InfoInventory.java index 648691e69..eb85f740a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/InfoInventory.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/InfoInventory.java @@ -1,6 +1,8 @@ package com.intellectualcrafters.plot.object; -import com.intellectualcrafters.plot.util.UUIDHandler; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -11,9 +13,7 @@ import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; +import com.intellectualcrafters.plot.util.UUIDHandler; /** * Created 2014-11-18 for PlotSquared diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/Plot.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/Plot.java index 49648a96d..20547a052 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/Plot.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/Plot.java @@ -21,21 +21,21 @@ package com.intellectualcrafters.plot.object; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.util.PlotHelper; -import com.intellectualcrafters.plot.util.UUIDHandler; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.block.Biome; import org.bukkit.entity.Player; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.database.DBFunc; +import com.intellectualcrafters.plot.flag.Flag; +import com.intellectualcrafters.plot.util.PlotHelper; +import com.intellectualcrafters.plot.util.UUIDHandler; /** * The plot class diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotGenerator.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotGenerator.java index 0d319045e..73935683e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotGenerator.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotGenerator.java @@ -21,9 +21,10 @@ package com.intellectualcrafters.plot.object; -import com.intellectualcrafters.plot.PlotMain; import org.bukkit.generator.ChunkGenerator; +import com.intellectualcrafters.plot.PlotMain; + public abstract class PlotGenerator extends ChunkGenerator { public PlotGenerator(final String world) { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotManager.java index 24493887b..40c72764d 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotManager.java @@ -21,12 +21,12 @@ package com.intellectualcrafters.plot.object; +import java.util.ArrayList; + import org.bukkit.Location; import org.bukkit.World; import org.bukkit.block.Biome; -import java.util.ArrayList; - @SuppressWarnings("unused") public abstract class PlotManager { /* diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotSelection.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotSelection.java index ddbc77125..45b93488b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotSelection.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotSelection.java @@ -21,14 +21,15 @@ package com.intellectualcrafters.plot.object; -import com.intellectualcrafters.plot.util.PlotHelper; -import com.intellectualcrafters.plot.util.SetBlockFast; +import java.util.HashMap; + import org.bukkit.Location; import org.bukkit.World; import org.bukkit.block.Biome; import org.bukkit.block.Block; -import java.util.HashMap; +import com.intellectualcrafters.plot.util.PlotHelper; +import com.intellectualcrafters.plot.util.SetBlockFast; /** * Created 2014-10-12 for PlotSquared diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotSettings.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotSettings.java index dfaf52212..b95ddf71e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotSettings.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotSettings.java @@ -21,18 +21,14 @@ package com.intellectualcrafters.plot.object; +import java.util.ArrayList; +import java.util.Set; + +import org.bukkit.block.Biome; + import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.util.PlotHelper; -import com.sun.istack.internal.NotNull; - -import org.bukkit.Location; -import org.bukkit.block.Biome; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; /** * plot settings diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotWorld.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotWorld.java index 1eace0604..04cb9c7e6 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotWorld.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotWorld.java @@ -21,21 +21,20 @@ package com.intellectualcrafters.plot.object; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.config.Configuration; -import com.intellectualcrafters.plot.config.ConfigurationNode; -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.flag.FlagManager; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import org.apache.commons.lang.StringUtils; import org.bukkit.Material; import org.bukkit.block.Biome; import org.bukkit.configuration.ConfigurationSection; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.config.Configuration; +import com.intellectualcrafters.plot.config.ConfigurationNode; +import com.intellectualcrafters.plot.flag.Flag; +import com.intellectualcrafters.plot.flag.FlagManager; /** * @author Jesse Boyd @@ -319,7 +318,7 @@ public abstract class PlotWorld { } catch (Exception e) { PlotMain.sendConsoleSenderMessage("&cInvalid default flags for "+this.worldname+": "+StringUtils.join(flags,",")); - this.DEFAULT_FLAGS = new Flag[] {}; + this.DEFAULT_FLAGS = new Flag[]{}; } } this.PVP = config.getBoolean("event.pvp"); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/RegionWrapper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/RegionWrapper.java index 3773109e4..1eb2a9e61 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/RegionWrapper.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/RegionWrapper.java @@ -1,6 +1,5 @@ package com.intellectualcrafters.plot.object; -import java.util.HashMap; public class RegionWrapper { public final int minX; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/StringWrapper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/StringWrapper.java index ebcbbc701..f6df20a35 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/StringWrapper.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/StringWrapper.java @@ -21,7 +21,6 @@ package com.intellectualcrafters.plot.object; -import com.intellectualcrafters.plot.config.Settings; /** * @author Empire92 diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/Title.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/Title.java index 2432d0e40..551e1d662 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/Title.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/Title.java @@ -21,15 +21,15 @@ package com.intellectualcrafters.plot.object; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.entity.Player; - import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.entity.Player; + /** * Minecraft 1.8 Title * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/Logger.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/Logger.java index df2d8ea2d..29ae1f4ca 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/Logger.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/Logger.java @@ -21,13 +21,17 @@ package com.intellectualcrafters.plot.util; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.config.C; - -import java.io.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; import java.util.ArrayList; import java.util.Date; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.config.C; + /** * Logging of errors and debug messages. * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/Metrics.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/Metrics.java index d11437f20..d4af7d53e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/Metrics.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/Metrics.java @@ -21,6 +21,27 @@ package com.intellectualcrafters.plot.util; +import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.InvocationTargetException; +import java.net.Proxy; +import java.net.URL; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; +import java.util.logging.Level; +import java.util.zip.GZIPOutputStream; + import org.bukkit.Bukkit; import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.YamlConfiguration; @@ -29,16 +50,6 @@ import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.scheduler.BukkitTask; -import java.io.*; -import java.lang.reflect.InvocationTargetException; -import java.net.Proxy; -import java.net.URL; -import java.net.URLConnection; -import java.net.URLEncoder; -import java.util.*; -import java.util.logging.Level; -import java.util.zip.GZIPOutputStream; - public class Metrics { /** * The current revision number diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PWE.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PWE.java index b9adc067f..c5735387b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PWE.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PWE.java @@ -21,6 +21,10 @@ package com.intellectualcrafters.plot.util; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.entity.Player; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; @@ -34,10 +38,6 @@ import com.sk89q.worldedit.function.mask.Mask; import com.sk89q.worldedit.function.mask.RegionMask; import com.sk89q.worldedit.regions.CuboidRegion; -import org.bukkit.Location; -import org.bukkit.World; -import org.bukkit.entity.Player; - /** * @author Citymonstret * @author Empire92 diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlayerFunctions.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlayerFunctions.java index 991e76fd9..cb5782e5d 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlayerFunctions.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlayerFunctions.java @@ -21,6 +21,17 @@ package com.intellectualcrafters.plot.util; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.entity.Player; +import org.bukkit.util.ChatPaginator; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; @@ -28,14 +39,6 @@ import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotManager; import com.intellectualcrafters.plot.object.PlotWorld; -import org.bukkit.ChatColor; -import org.bukkit.Location; -import org.bukkit.OfflinePlayer; -import org.bukkit.World; -import org.bukkit.entity.Player; -import org.bukkit.util.ChatPaginator; - -import java.util.*; /** * Functions involving players, plots and locations. diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlotHelper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlotHelper.java index e13ce0e37..5ce5cb3ce 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlotHelper.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlotHelper.java @@ -21,16 +21,20 @@ package com.intellectualcrafters.plot.util; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.generator.HybridPlotWorld; -import com.intellectualcrafters.plot.listeners.PlotListener; -import com.intellectualcrafters.plot.object.*; +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; import net.milkbowl.vault.economy.Economy; -import org.bukkit.*; +import org.bukkit.Bukkit; +import org.bukkit.Chunk; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.OfflinePlayer; +import org.bukkit.World; import org.bukkit.block.Biome; import org.bukkit.block.Block; import org.bukkit.block.Sign; @@ -38,11 +42,16 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.database.DBFunc; +import com.intellectualcrafters.plot.listeners.PlotListener; +import com.intellectualcrafters.plot.object.BlockLoc; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotBlock; +import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.object.PlotManager; +import com.intellectualcrafters.plot.object.PlotWorld; /** * plot functions @@ -892,7 +901,7 @@ import java.util.UUID; Plot plot = getPlot(w, plotid); BlockLoc home = plot.settings.getPosition(); final Location bot = getPlotBottomLoc(w, plotid); - if (home == null) { + if (home == null || (home.x == 0 && home.z == 0)) { final Location top = getPlotTopLoc(w, plotid); final int x = top.getBlockX() - bot.getBlockX(); final int z = top.getBlockZ() - bot.getBlockZ(); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/RUtils.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/RUtils.java index 5e3eb44f2..008b152d7 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/RUtils.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/RUtils.java @@ -21,11 +21,12 @@ package com.intellectualcrafters.plot.util; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.config.Settings; import org.bukkit.Location; import org.bukkit.entity.Player; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.config.Settings; + /** * Random utilities * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/ReflectionUtils.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/ReflectionUtils.java index fa80c1925..a35e7a67c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/ReflectionUtils.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/ReflectionUtils.java @@ -21,9 +21,6 @@ package com.intellectualcrafters.plot.util; -import org.bukkit.Bukkit; -import org.bukkit.Server; - import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -32,6 +29,9 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +import org.bukkit.Bukkit; +import org.bukkit.Server; + /** * @author DPOH-VAR * @version 1.0 diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java index bf0171f51..578be208c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java @@ -21,23 +21,37 @@ package com.intellectualcrafters.plot.util; -import com.intellectualcrafters.jnbt.*; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotId; -import org.bukkit.Chunk; -import org.bukkit.Location; -import org.bukkit.World; -import org.bukkit.block.Block; - -import java.io.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; +import org.bukkit.Chunk; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.block.Block; + +import com.intellectualcrafters.jnbt.ByteArrayTag; +import com.intellectualcrafters.jnbt.CompoundTag; +import com.intellectualcrafters.jnbt.IntTag; +import com.intellectualcrafters.jnbt.ListTag; +import com.intellectualcrafters.jnbt.NBTInputStream; +import com.intellectualcrafters.jnbt.NBTOutputStream; +import com.intellectualcrafters.jnbt.ShortTag; +import com.intellectualcrafters.jnbt.StringTag; +import com.intellectualcrafters.jnbt.Tag; +import com.intellectualcrafters.plot.PlotMain; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotBlock; +import com.intellectualcrafters.plot.object.PlotId; + /** * Schematic Handler * diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SendChunk.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SendChunk.java index 19fe9ed33..4b85f5cc0 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SendChunk.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SendChunk.java @@ -1,16 +1,17 @@ package com.intellectualcrafters.plot.util; +import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass; + +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.Chunk; + import com.intellectualcrafters.plot.util.ReflectionUtils.RefClass; import com.intellectualcrafters.plot.util.ReflectionUtils.RefConstructor; import com.intellectualcrafters.plot.util.ReflectionUtils.RefField; import com.intellectualcrafters.plot.util.ReflectionUtils.RefMethod; -import org.bukkit.Bukkit; -import org.bukkit.Chunk; - -import java.util.ArrayList; -import java.util.List; - -import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass; /** * An utility that can be used to send chunks, rather than using bukkit code to do so (uses heavy NMS) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SetBlockFast.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SetBlockFast.java index 089566375..86b95b112 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SetBlockFast.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/SetBlockFast.java @@ -21,14 +21,15 @@ package com.intellectualcrafters.plot.util; -import com.intellectualcrafters.plot.util.ReflectionUtils.RefClass; -import com.intellectualcrafters.plot.util.ReflectionUtils.RefMethod; -import org.bukkit.Bukkit; -import org.bukkit.Chunk; +import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass; import java.util.ArrayList; -import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass; +import org.bukkit.Bukkit; +import org.bukkit.Chunk; + +import com.intellectualcrafters.plot.util.ReflectionUtils.RefClass; +import com.intellectualcrafters.plot.util.ReflectionUtils.RefMethod; /** * SetBlockFast class
Used to do fast world editing diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/UUIDHandler.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/UUIDHandler.java index 30f073452..64a23aa2d 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/UUIDHandler.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/UUIDHandler.java @@ -2,9 +2,6 @@ package com.intellectualcrafters.plot.util; import java.io.File; import java.io.FilenameFilter; -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.UUID; @@ -21,7 +18,6 @@ import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.object.StringWrapper; import com.intellectualcrafters.plot.uuid.DefaultUUIDWrapper; import com.intellectualcrafters.plot.uuid.UUIDWrapper; -import com.intellectualcrafters.plot.uuid.OfflineUUIDWrapper; public class UUIDHandler { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/uuid/DefaultUUIDWrapper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/uuid/DefaultUUIDWrapper.java index f3937e7ca..85d7be275 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/uuid/DefaultUUIDWrapper.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/uuid/DefaultUUIDWrapper.java @@ -1,11 +1,11 @@ package com.intellectualcrafters.plot.uuid; +import java.util.UUID; + import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.entity.Player; -import java.util.UUID; - public class DefaultUUIDWrapper extends UUIDWrapper { @Override diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/uuid/OfflineUUIDWrapper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/uuid/OfflineUUIDWrapper.java index 80a2ab52a..77a76513d 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/uuid/OfflineUUIDWrapper.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/uuid/OfflineUUIDWrapper.java @@ -1,14 +1,15 @@ package com.intellectualcrafters.plot.uuid; +import java.util.UUID; + +import org.bukkit.Bukkit; +import org.bukkit.OfflinePlayer; +import org.bukkit.entity.Player; + import com.google.common.base.Charsets; import com.google.common.collect.BiMap; import com.intellectualcrafters.plot.object.StringWrapper; import com.intellectualcrafters.plot.util.UUIDHandler; -import org.bukkit.Bukkit; -import org.bukkit.OfflinePlayer; -import org.bukkit.entity.Player; - -import java.util.UUID; public class OfflineUUIDWrapper extends UUIDWrapper { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/uuid/UUIDWrapper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/uuid/UUIDWrapper.java index ede99dfaa..8e37da72f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/uuid/UUIDWrapper.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/uuid/UUIDWrapper.java @@ -1,10 +1,10 @@ package com.intellectualcrafters.plot.uuid; +import java.util.UUID; + import org.bukkit.OfflinePlayer; import org.bukkit.entity.Player; -import java.util.UUID; - public abstract class UUIDWrapper { public abstract UUID getUUID(Player player); diff --git a/PlotSquared/src/main/java/com/intellectualsites/translation/TranslationManager.java b/PlotSquared/src/main/java/com/intellectualsites/translation/TranslationManager.java index 228591970..b3e489429 100644 --- a/PlotSquared/src/main/java/com/intellectualsites/translation/TranslationManager.java +++ b/PlotSquared/src/main/java/com/intellectualsites/translation/TranslationManager.java @@ -3,7 +3,11 @@ package com.intellectualsites.translation; import java.io.PrintStream; import java.lang.annotation.Annotation; import java.lang.reflect.Field; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; /** * Translation Manager Main class diff --git a/PlotSquared/src/main/java/com/intellectualsites/translation/TranslationObject.java b/PlotSquared/src/main/java/com/intellectualsites/translation/TranslationObject.java index fded67201..186a9869f 100644 --- a/PlotSquared/src/main/java/com/intellectualsites/translation/TranslationObject.java +++ b/PlotSquared/src/main/java/com/intellectualsites/translation/TranslationObject.java @@ -1,6 +1,5 @@ package com.intellectualsites.translation; -import com.sun.istack.internal.NotNull; public class TranslationObject { @@ -13,7 +12,7 @@ public class TranslationObject { // Like a plugin name for example | can be null private final String creationDescription; - public TranslationObject(@NotNull final String key, @NotNull final String defaultValue, String description, String creationDescription) { + public TranslationObject(final String key, final String defaultValue, String description, String creationDescription) { if (description == null) { description = ""; } diff --git a/PlotSquared/src/main/java/com/intellectualsites/translation/YamlTranslationFile.java b/PlotSquared/src/main/java/com/intellectualsites/translation/YamlTranslationFile.java index d1e2aa4bd..5aa10259f 100644 --- a/PlotSquared/src/main/java/com/intellectualsites/translation/YamlTranslationFile.java +++ b/PlotSquared/src/main/java/com/intellectualsites/translation/YamlTranslationFile.java @@ -1,8 +1,5 @@ package com.intellectualsites.translation; -import org.yaml.snakeyaml.DumperOptions; -import org.yaml.snakeyaml.Yaml; - import java.io.File; import java.io.FileReader; import java.io.FileWriter; @@ -11,6 +8,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.yaml.snakeyaml.DumperOptions; +import org.yaml.snakeyaml.Yaml; + /** * The YAML implementation of TranslationFile Relies heavily on SnakeYAML * diff --git a/PlotSquared/src/main/java/com/intellectualsites/translation/bukkit/BukkitTranslation.java b/PlotSquared/src/main/java/com/intellectualsites/translation/bukkit/BukkitTranslation.java index 9f3c76378..1728acfb0 100644 --- a/PlotSquared/src/main/java/com/intellectualsites/translation/bukkit/BukkitTranslation.java +++ b/PlotSquared/src/main/java/com/intellectualsites/translation/bukkit/BukkitTranslation.java @@ -1,13 +1,14 @@ package com.intellectualsites.translation.bukkit; +import java.io.File; + +import org.bukkit.Material; +import org.bukkit.plugin.java.JavaPlugin; + import com.intellectualsites.translation.TranslationAsset; import com.intellectualsites.translation.TranslationLanguage; import com.intellectualsites.translation.TranslationManager; import com.intellectualsites.translation.TranslationObject; -import org.bukkit.Material; -import org.bukkit.plugin.java.JavaPlugin; - -import java.io.File; /** * @author Citymonstret diff --git a/PlotSquared/src/main/java/com/intellectualsites/translation/bukkit/TranslationPlugin.java b/PlotSquared/src/main/java/com/intellectualsites/translation/bukkit/TranslationPlugin.java index 66354b4aa..4fa992155 100644 --- a/PlotSquared/src/main/java/com/intellectualsites/translation/bukkit/TranslationPlugin.java +++ b/PlotSquared/src/main/java/com/intellectualsites/translation/bukkit/TranslationPlugin.java @@ -1,9 +1,14 @@ package com.intellectualsites.translation.bukkit; -import com.intellectualsites.translation.*; +import java.util.logging.Level; + import org.bukkit.plugin.java.JavaPlugin; -import java.util.logging.Level; +import com.intellectualsites.translation.Translation; +import com.intellectualsites.translation.TranslationFile; +import com.intellectualsites.translation.TranslationLanguage; +import com.intellectualsites.translation.TranslationManager; +import com.intellectualsites.translation.YamlTranslationFile; public class TranslationPlugin extends JavaPlugin { diff --git a/PlotSquared/src/test/java/Test1.java b/PlotSquared/src/test/java/Test1.java index 2f3ded929..e8bddc927 100644 --- a/PlotSquared/src/test/java/Test1.java +++ b/PlotSquared/src/test/java/Test1.java @@ -1,3 +1,14 @@ +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Set; +import java.util.UUID; + +import org.bukkit.OfflinePlayer; +import org.bukkit.block.Biome; +import org.junit.Assert; +import org.junit.Test; + import com.intellectualcrafters.plot.PlotMain; import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.database.AbstractDB; @@ -5,21 +16,14 @@ import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.generator.HybridPlotManager; import com.intellectualcrafters.plot.generator.HybridPlotWorld; -import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotComment; +import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.object.PlotManager; +import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.PlotHelper; import com.intellectualcrafters.plot.util.SetBlockFast; -import org.bukkit.OfflinePlayer; -import org.bukkit.block.Biome; -import org.junit.Assert; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Set; -import java.util.UUID; - public class Test1 { static Integer count = 0;