From 3a15254d8d371b2223a4f2e2c99cf7c06e64e503 Mon Sep 17 00:00:00 2001 From: Sauilitired Date: Mon, 27 Jul 2015 19:50:04 +0200 Subject: [PATCH] -m \'So I hear you like commits ...\' --- .../configuration/MemorySection.java | 7 +- .../configuration/file/FileConfiguration.java | 25 ++-- .../configuration/file/YamlConfiguration.java | 19 ++- .../configuration/file/YamlConstructor.java | 7 +- .../configuration/file/YamlRepresenter.java | 11 +- .../ConfigurationSerialization.java | 5 +- .../jnbt/CompoundTagBuilder.java | 4 +- .../intellectualcrafters/jnbt/ListTag.java | 4 +- .../jnbt/ListTagBuilder.java | 4 +- .../intellectualcrafters/json/JSONObject.java | 9 +- .../json/JSONTokener.java | 7 +- .../intellectualcrafters/plot/IPlotMain.java | 82 ++++++------- .../com/intellectualcrafters/plot/PS.java | 86 +++----------- .../plot/api/PlotAPI.java | 33 ++---- .../plot/commands/Add.java | 9 +- .../plot/commands/Auto.java | 11 +- .../plot/commands/Buy.java | 10 +- .../plot/commands/Chat.java | 3 +- .../plot/commands/Claim.java | 15 +-- .../plot/commands/Clear.java | 14 +-- .../plot/commands/Cluster.java | 29 ++--- .../plot/commands/Comment.java | 12 +- .../plot/commands/Condense.java | 16 +-- .../plot/commands/Confirm.java | 3 +- .../plot/commands/Copy.java | 5 +- .../plot/commands/CreateRoadSchematic.java | 3 +- .../plot/commands/Database.java | 14 +-- .../plot/commands/Debug.java | 4 +- .../plot/commands/DebugAllowUnsafe.java | 11 +- .../plot/commands/DebugClaimTest.java | 24 +--- .../plot/commands/DebugClear.java | 5 +- .../plot/commands/DebugExec.java | 39 ++---- .../plot/commands/DebugFill.java | 3 +- .../plot/commands/DebugFixFlags.java | 13 +- .../plot/commands/DebugLoadTest.java | 8 +- .../plot/commands/DebugPaste.java | 6 +- .../plot/commands/DebugRoadRegen.java | 3 +- .../plot/commands/DebugSaveTest.java | 7 +- .../plot/commands/DebugUUID.java | 25 ++-- .../plot/commands/Delete.java | 10 +- .../plot/commands/Deny.java | 15 +-- .../plot/commands/Download.java | 7 +- .../plot/commands/FlagCmd.java | 14 +-- .../plot/commands/Help.java | 2 +- .../plot/commands/Home.java | 7 +- .../plot/commands/Inbox.java | 16 ++- .../plot/commands/Info.java | 28 ++--- .../plot/commands/Kick.java | 3 +- .../plot/commands/Load.java | 11 +- .../plot/commands/MainCommand.java | 18 +-- .../plot/commands/Merge.java | 28 ++--- .../plot/commands/Move.java | 11 +- .../plot/commands/MusicSubcommand.java | 10 +- .../plot/commands/Purge.java | 14 +-- .../plot/commands/Rate.java | 33 ++---- .../plot/commands/RegenAllRoads.java | 9 +- .../plot/commands/Reload.java | 4 +- .../plot/commands/Remove.java | 12 +- .../plot/commands/RequiredType.java | 2 +- .../plot/commands/Save.java | 11 +- .../plot/commands/SchematicCmd.java | 22 ++-- .../plot/commands/Set.java | 32 ++--- .../plot/commands/SetOwner.java | 11 +- .../plot/commands/Setup.java | 26 ++-- .../plot/commands/SubCommand.java | 3 +- .../plot/commands/Swap.java | 14 +-- .../plot/commands/TP.java | 9 +- .../plot/commands/Target.java | 5 +- .../plot/commands/Template.java | 29 ++--- .../plot/commands/Toggle.java | 3 +- .../plot/commands/Trim.java | 23 ++-- .../plot/commands/Trust.java | 9 +- .../plot/commands/Unclaim.java | 3 +- .../plot/commands/Undeny.java | 11 +- .../plot/commands/Unlink.java | 3 +- .../plot/commands/Untrust.java | 11 +- .../plot/commands/Update.java | 11 +- .../plot/commands/Visit.java | 13 +- .../plot/commands/WE_Anywhere.java | 5 +- .../plot/commands/list.java | 30 ++--- .../plot/commands/plugin.java | 15 +-- .../intellectualcrafters/plot/config/C.java | 17 +-- .../plot/config/Configuration.java | 9 +- .../plot/config/ConfigurationNode.java | 8 +- .../plot/database/AbstractDB.java | 108 ++++++++--------- .../plot/database/DBFunc.java | 20 +--- .../plot/database/MySQL.java | 6 +- .../plot/database/SQLManager.java | 33 +----- .../plot/database/SQLite.java | 10 +- .../plot/database/StmtMod.java | 4 +- .../plot/flag/FlagManager.java | 15 +-- .../plot/flag/FlagValue.java | 10 +- .../plot/generator/BukkitHybridUtils.java | 38 ++---- .../plot/generator/ClassicPlotManager.java | 11 +- .../plot/generator/HybridPlotManager.java | 23 ++-- .../plot/generator/HybridPlotWorld.java | 7 +- .../plot/generator/HybridPop.java | 13 +- .../plot/generator/HybridUtils.java | 16 +-- .../plot/object/ConsolePlayer.java | 9 +- .../plot/object/Plot.java | 12 +- .../plot/object/PlotAnalysis.java | 16 +-- .../plot/object/PlotCluster.java | 4 +- .../plot/object/PlotHandler.java | 8 +- .../plot/object/PlotManager.java | 4 +- .../plot/object/PlotPlayer.java | 42 +++---- .../plot/object/PlotSettings.java | 10 +- .../plot/object/PlotWorld.java | 10 +- .../plot/object/Rating.java | 4 +- .../plot/object/comment/InboxOwner.java | 4 +- .../plot/object/comment/InboxPublic.java | 4 +- .../plot/util/BlockUpdateUtil.java | 4 +- .../plot/util/ChunkManager.java | 13 +- .../plot/util/ClusterManager.java | 28 ++--- .../plot/util/CmdConfirm.java | 4 +- .../plot/util/EventUtil.java | 16 +-- .../plot/util/ExpireManager.java | 25 ++-- .../plot/util/MainUtil.java | 24 +--- .../plot/util/NbtFactory.java | 49 +++----- .../plot/util/ReflectionUtils.java | 6 +- .../plot/util/SchematicHandler.java | 55 ++------- .../plot/util/SetBlockQueue.java | 10 +- .../plot/util/StringMan.java | 1 - .../plot/util/TaskManager.java | 4 +- .../plot/util/UUIDHandler.java | 14 +-- .../plot/util/helpmenu/HelpMenu.java | 3 +- .../plot/util/helpmenu/HelpObject.java | 4 +- .../plot/util/helpmenu/HelpPage.java | 2 - .../plot/uuid/DefaultUUIDWrapper.java | 11 +- .../plot/uuid/LowerOfflineUUIDWrapper.java | 23 ++-- .../plot/uuid/OfflineUUIDWrapper.java | 23 ++-- .../plot/uuid/UUIDWrapper.java | 4 +- .../com/plotsquared/bukkit/BukkitMain.java | 28 ++--- .../bukkit/commands/BukkitCommand.java | 19 +-- .../database/plotme/APlotMeConnector.java | 15 ++- .../plotme/ClassicPlotMeConnector.java | 16 +-- .../database/plotme/LikePlotMeConverter.java | 27 ++--- .../database/plotme/PlotMeConnector_017.java | 16 +-- .../bukkit/events/ClusterFlagRemoveEvent.java | 5 +- .../bukkit/events/PlayerClaimPlotEvent.java | 3 +- .../bukkit/events/PlayerEnterPlotEvent.java | 3 +- .../bukkit/events/PlayerLeavePlotEvent.java | 3 +- .../bukkit/events/PlayerPlotDeniedEvent.java | 5 +- .../bukkit/events/PlayerPlotHelperEvent.java | 5 +- .../bukkit/events/PlayerPlotTrustedEvent.java | 5 +- .../events/PlayerTeleportToPlotEvent.java | 5 +- .../bukkit/events/PlotClearEvent.java | 3 +- .../bukkit/events/PlotDeleteEvent.java | 3 +- .../plotsquared/bukkit/events/PlotEvent.java | 3 +- .../bukkit/events/PlotFlagAddEvent.java | 5 +- .../bukkit/events/PlotFlagRemoveEvent.java | 5 +- .../bukkit/events/PlotMergeEvent.java | 7 +- .../bukkit/events/PlotRateEvent.java | 3 +- .../bukkit/events/PlotUnlinkEvent.java | 5 +- .../bukkit/generator/AugmentedPopulator.java | 29 ++--- .../generator/BukkitGeneratorWrapper.java | 3 +- .../bukkit/generator/BukkitPlotGenerator.java | 20 ++-- .../bukkit/generator/HybridGen.java | 17 +-- .../bukkit/listeners/ChatListener.java | 17 +-- .../bukkit/listeners/ChunkListener.java | 7 +- .../bukkit/listeners/ForceFieldListener.java | 23 ++-- .../bukkit/listeners/InventoryListener.java | 7 +- .../bukkit/listeners/PlayerEvents.java | 112 ++++-------------- .../bukkit/listeners/PlayerEvents_1_8.java | 23 ++-- .../bukkit/listeners/PlayerEvents_1_8_3.java | 15 ++- .../bukkit/listeners/PlotListener.java | 42 +++---- .../bukkit/listeners/PlotPlusListener.java | 33 +++--- .../bukkit/listeners/TNTListener.java | 15 ++- .../bukkit/listeners/WorldEvents.java | 9 +- .../listeners/worldedit/NullExtent.java | 6 +- .../worldedit/ProcessedWEExtent.java | 4 +- .../bukkit/listeners/worldedit/WEExtent.java | 4 +- .../listeners/worldedit/WEListener.java | 21 ++-- .../bukkit/listeners/worldedit/WEManager.java | 11 +- .../listeners/worldedit/WESubscriber.java | 4 +- .../bukkit/object/BukkitOfflinePlayer.java | 4 +- .../bukkit/object/BukkitPlayer.java | 27 ++--- .../bukkit/object/InfoInventory.java | 10 +- .../bukkit/object/PlotPopulator.java | 11 +- .../bukkit/object/comment/CommentManager.java | 17 ++- .../bukkit/object/entity/EntityWrapper.java | 24 +--- .../object/entity/LivingEntityStats.java | 4 +- .../bukkit/object/schematic/StateWrapper.java | 27 ++--- .../bukkit/titles/AbstractTitle.java | 3 +- .../bukkit/titles/DefaultTitle.java | 5 +- .../bukkit/titles/DefaultTitleManager.java | 8 +- .../titles/DefaultTitleManager_183.java | 8 +- .../bukkit/titles/DefaultTitle_183.java | 5 +- .../plotsquared/bukkit/titles/HackTitle.java | 5 +- .../bukkit/titles/HackTitleManager.java | 8 +- .../bukkit/util/ReflectionUtil.java | 4 +- .../plotsquared/bukkit/util/SetupUtils.java | 9 +- .../bukkit/util/WorldEditSchematic.java | 9 +- .../util/bukkit/BukkitChunkManager.java | 59 ++------- .../bukkit/util/bukkit/BukkitEconHandler.java | 14 +-- .../bukkit/util/bukkit/BukkitEventUtil.java | 32 ++--- .../util/bukkit/BukkitInventoryUtil.java | 15 ++- .../util/bukkit/BukkitPlayerFunctions.java | 13 +- .../util/bukkit/BukkitPlayerManager.java | 2 +- .../util/bukkit/BukkitSchematicHandler.java | 27 ++--- .../util/bukkit/BukkitSetBlockManager.java | 11 +- .../bukkit/util/bukkit/BukkitSetupUtils.java | 17 ++- .../bukkit/util/bukkit/BukkitTaskManager.java | 5 +- .../bukkit/util/bukkit/BukkitUtil.java | 38 ++---- .../bukkit/util/bukkit/Metrics.java | 36 ++---- .../bukkit/util/bukkit/OfflinePlayerUtil.java | 18 +-- .../bukkit/util/bukkit/SendChunk.java | 19 ++- .../bukkit/util/bukkit/SetBlockFast.java | 13 +- .../bukkit/util/bukkit/SetBlockFast_1_8.java | 21 ++-- .../bukkit/util/bukkit/SetBlockSlow.java | 5 +- .../bukkit/util/bukkit/SetGenCB.java | 15 ++- .../bukkit/util/bukkit/chat/ArrayWrapper.java | 4 +- .../bukkit/util/bukkit/chat/FancyMessage.java | 42 +++---- .../bukkit/chat/JsonRepresentedObject.java | 6 +- .../bukkit/util/bukkit/chat/JsonString.java | 6 +- .../bukkit/util/bukkit/chat/MessagePart.java | 17 ++- .../bukkit/util/bukkit/chat/Reflection.java | 4 +- .../util/bukkit/chat/TextualComponent.java | 8 +- .../util/bukkit/uuid/FileUUIDHandler.java | 27 ++--- .../util/bukkit/uuid/SQLUUIDHandler.java | 29 ++--- .../general}/commands/Argument.java | 4 +- .../general}/commands/Command.java | 8 +- .../general}/commands/CommandCaller.java | 2 +- .../general}/commands/CommandDeclaration.java | 2 +- .../commands/CommandHandlingOutput.java | 2 +- .../general}/commands/CommandManager.java | 12 +- .../java/com/plotsquared/sponge/PlotGen.java | 3 +- .../sponge/SpongeGeneratorWrapper.java | 3 +- .../com/plotsquared/sponge/SpongeMain.java | 39 +++--- .../com/plotsquared/sponge/SpongeMetrics.java | 10 +- .../sponge/SpongePlotGenerator.java | 9 +- 230 files changed, 1217 insertions(+), 2125 deletions(-) rename src/main/java/com/{intellectualsites => plotsquared/general}/commands/Argument.java (98%) rename src/main/java/com/{intellectualsites => plotsquared/general}/commands/Command.java (99%) rename src/main/java/com/{intellectualsites => plotsquared/general}/commands/CommandCaller.java (88%) rename src/main/java/com/{intellectualsites => plotsquared/general}/commands/CommandDeclaration.java (93%) rename src/main/java/com/{intellectualsites => plotsquared/general}/commands/CommandHandlingOutput.java (95%) rename src/main/java/com/{intellectualsites => plotsquared/general}/commands/CommandManager.java (93%) diff --git a/src/main/java/com/intellectualcrafters/configuration/MemorySection.java b/src/main/java/com/intellectualcrafters/configuration/MemorySection.java index 2c3bc0f4c..2affed2a7 100644 --- a/src/main/java/com/intellectualcrafters/configuration/MemorySection.java +++ b/src/main/java/com/intellectualcrafters/configuration/MemorySection.java @@ -1,11 +1,6 @@ package com.intellectualcrafters.configuration; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; /** * A type of {@link ConfigurationSection} that is stored in memory. diff --git a/src/main/java/com/intellectualcrafters/configuration/file/FileConfiguration.java b/src/main/java/com/intellectualcrafters/configuration/file/FileConfiguration.java index caa269918..5167892bf 100644 --- a/src/main/java/com/intellectualcrafters/configuration/file/FileConfiguration.java +++ b/src/main/java/com/intellectualcrafters/configuration/file/FileConfiguration.java @@ -1,24 +1,13 @@ package com.intellectualcrafters.configuration.file; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.Reader; -import java.io.Writer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; - -import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; - import com.intellectualcrafters.configuration.Configuration; import com.intellectualcrafters.configuration.InvalidConfigurationException; import com.intellectualcrafters.configuration.MemoryConfiguration; +import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; + +import java.io.*; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; /** * This is a base class for all File based implementations of {@link @@ -157,7 +146,7 @@ public abstract class FileConfiguration extends MemoryConfiguration { * a valid Configuration. * @throws IllegalArgumentException Thrown when file is null. */ - public void load(File file) throws FileNotFoundException, IOException, InvalidConfigurationException { + public void load(File file) throws IOException, InvalidConfigurationException { if (file == null) throw new NullPointerException("File cannot be null"); final FileInputStream stream = new FileInputStream(file); @@ -240,7 +229,7 @@ public abstract class FileConfiguration extends MemoryConfiguration { * a valid Configuration. * @throws IllegalArgumentException Thrown when file is null. */ - public void load(String file) throws FileNotFoundException, IOException, InvalidConfigurationException { + public void load(String file) throws IOException, InvalidConfigurationException { if (file == null) throw new NullPointerException("File cannot be null"); load(new File(file)); diff --git a/src/main/java/com/intellectualcrafters/configuration/file/YamlConfiguration.java b/src/main/java/com/intellectualcrafters/configuration/file/YamlConfiguration.java index 4f395b580..289e93caa 100644 --- a/src/main/java/com/intellectualcrafters/configuration/file/YamlConfiguration.java +++ b/src/main/java/com/intellectualcrafters/configuration/file/YamlConfiguration.java @@ -1,5 +1,14 @@ package com.intellectualcrafters.configuration.file; +import com.intellectualcrafters.configuration.Configuration; +import com.intellectualcrafters.configuration.ConfigurationSection; +import com.intellectualcrafters.configuration.InvalidConfigurationException; +import com.intellectualcrafters.plot.PS; +import org.yaml.snakeyaml.DumperOptions; +import org.yaml.snakeyaml.Yaml; +import org.yaml.snakeyaml.error.YAMLException; +import org.yaml.snakeyaml.representer.Representer; + import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -8,16 +17,6 @@ import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.util.Map; -import org.yaml.snakeyaml.DumperOptions; -import org.yaml.snakeyaml.Yaml; -import org.yaml.snakeyaml.error.YAMLException; -import org.yaml.snakeyaml.representer.Representer; - -import com.intellectualcrafters.configuration.Configuration; -import com.intellectualcrafters.configuration.ConfigurationSection; -import com.intellectualcrafters.configuration.InvalidConfigurationException; -import com.intellectualcrafters.plot.PS; - /** * An implementation of {@link Configuration} which saves all files in Yaml. * Note that this implementation is not synchronized. diff --git a/src/main/java/com/intellectualcrafters/configuration/file/YamlConstructor.java b/src/main/java/com/intellectualcrafters/configuration/file/YamlConstructor.java index 5a8b41732..1c2f9f1bb 100644 --- a/src/main/java/com/intellectualcrafters/configuration/file/YamlConstructor.java +++ b/src/main/java/com/intellectualcrafters/configuration/file/YamlConstructor.java @@ -1,14 +1,13 @@ package com.intellectualcrafters.configuration.file; -import java.util.LinkedHashMap; -import java.util.Map; - +import com.intellectualcrafters.configuration.serialization.ConfigurationSerialization; import org.yaml.snakeyaml.constructor.SafeConstructor; import org.yaml.snakeyaml.error.YAMLException; import org.yaml.snakeyaml.nodes.Node; import org.yaml.snakeyaml.nodes.Tag; -import com.intellectualcrafters.configuration.serialization.ConfigurationSerialization; +import java.util.LinkedHashMap; +import java.util.Map; public class YamlConstructor extends SafeConstructor { diff --git a/src/main/java/com/intellectualcrafters/configuration/file/YamlRepresenter.java b/src/main/java/com/intellectualcrafters/configuration/file/YamlRepresenter.java index d4ef6da29..d055246da 100644 --- a/src/main/java/com/intellectualcrafters/configuration/file/YamlRepresenter.java +++ b/src/main/java/com/intellectualcrafters/configuration/file/YamlRepresenter.java @@ -1,14 +1,13 @@ package com.intellectualcrafters.configuration.file; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.yaml.snakeyaml.nodes.Node; -import org.yaml.snakeyaml.representer.Representer; - import com.intellectualcrafters.configuration.ConfigurationSection; import com.intellectualcrafters.configuration.serialization.ConfigurationSerializable; import com.intellectualcrafters.configuration.serialization.ConfigurationSerialization; +import org.yaml.snakeyaml.nodes.Node; +import org.yaml.snakeyaml.representer.Representer; + +import java.util.LinkedHashMap; +import java.util.Map; public class YamlRepresenter extends Representer { diff --git a/src/main/java/com/intellectualcrafters/configuration/serialization/ConfigurationSerialization.java b/src/main/java/com/intellectualcrafters/configuration/serialization/ConfigurationSerialization.java index 4c2f4a5bc..2ccc1c7f4 100644 --- a/src/main/java/com/intellectualcrafters/configuration/serialization/ConfigurationSerialization.java +++ b/src/main/java/com/intellectualcrafters/configuration/serialization/ConfigurationSerialization.java @@ -1,5 +1,7 @@ package com.intellectualcrafters.configuration.serialization; +import com.intellectualcrafters.configuration.Configuration; + import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -9,8 +11,6 @@ import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; -import com.intellectualcrafters.configuration.Configuration; - /** * Utility class for storing and retrieving classes for {@link Configuration}. */ @@ -220,7 +220,6 @@ public class ConfigurationSerialization { */ public static void unregisterClass(Class clazz) { while (aliases.values().remove(clazz)) { - ; } } diff --git a/src/main/java/com/intellectualcrafters/jnbt/CompoundTagBuilder.java b/src/main/java/com/intellectualcrafters/jnbt/CompoundTagBuilder.java index 3036481f2..d1e11b254 100644 --- a/src/main/java/com/intellectualcrafters/jnbt/CompoundTagBuilder.java +++ b/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/src/main/java/com/intellectualcrafters/jnbt/ListTag.java b/src/main/java/com/intellectualcrafters/jnbt/ListTag.java index 5a0cd5faf..0a742dd98 100644 --- a/src/main/java/com/intellectualcrafters/jnbt/ListTag.java +++ b/src/main/java/com/intellectualcrafters/jnbt/ListTag.java @@ -1,11 +1,11 @@ package com.intellectualcrafters.jnbt; -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; + /** * The {@code TAG_List} tag. diff --git a/src/main/java/com/intellectualcrafters/jnbt/ListTagBuilder.java b/src/main/java/com/intellectualcrafters/jnbt/ListTagBuilder.java index af94f866d..6c438eaa6 100644 --- a/src/main/java/com/intellectualcrafters/jnbt/ListTagBuilder.java +++ b/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/src/main/java/com/intellectualcrafters/json/JSONObject.java b/src/main/java/com/intellectualcrafters/json/JSONObject.java index 3cac13db7..bc8590363 100644 --- a/src/main/java/com/intellectualcrafters/json/JSONObject.java +++ b/src/main/java/com/intellectualcrafters/json/JSONObject.java @@ -6,15 +6,8 @@ import java.io.Writer; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -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.*; 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/src/main/java/com/intellectualcrafters/json/JSONTokener.java b/src/main/java/com/intellectualcrafters/json/JSONTokener.java index 0c86068ea..cc96356e8 100644 --- a/src/main/java/com/intellectualcrafters/json/JSONTokener.java +++ b/src/main/java/com/intellectualcrafters/json/JSONTokener.java @@ -1,11 +1,6 @@ package com.intellectualcrafters.json; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.StringReader; +import java.io.*; /** * A JSONTokener takes a source string and extracts characters and tokens from it. It is used by the JSONObject and diff --git a/src/main/java/com/intellectualcrafters/plot/IPlotMain.java b/src/main/java/com/intellectualcrafters/plot/IPlotMain.java index 632a4532c..44a55ff82 100644 --- a/src/main/java/com/intellectualcrafters/plot/IPlotMain.java +++ b/src/main/java/com/intellectualcrafters/plot/IPlotMain.java @@ -1,86 +1,76 @@ package com.intellectualcrafters.plot; -import java.io.File; -import java.util.UUID; - -import org.bukkit.generator.ChunkGenerator; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.generator.HybridUtils; import com.intellectualcrafters.plot.generator.PlotGenerator; -import com.plotsquared.bukkit.listeners.APlotListener; import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.intellectualcrafters.plot.util.EconHandler; -import com.intellectualcrafters.plot.util.EventUtil; -import com.intellectualcrafters.plot.util.InventoryUtil; -import com.intellectualcrafters.plot.util.PlayerManager; -import com.intellectualcrafters.plot.util.UUIDHandlerImplementation; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.bukkit.listeners.APlotListener; import com.plotsquared.bukkit.util.SetupUtils; -import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualcrafters.plot.uuid.UUIDWrapper; + +import java.io.File; +import java.util.UUID; public interface IPlotMain { - public void log(String message); + void log(String message); - public File getDirectory(); + File getDirectory(); - public void disable(); + void disable(); - public int[] getPluginVersion(); + int[] getPluginVersion(); - public int[] getServerVersion(); + int[] getServerVersion(); - public void handleKick(UUID uuid, C c); + void handleKick(UUID uuid, C c); - public TaskManager getTaskManager(); + TaskManager getTaskManager(); - public void runEntityTask(); + void runEntityTask(); - public void registerCommands(); + void registerCommands(); - public void registerPlayerEvents(); + void registerPlayerEvents(); - public void registerInventoryEvents(); + void registerInventoryEvents(); - public void registerPlotPlusEvents(); + void registerPlotPlusEvents(); - public void registerForceFieldEvents(); + void registerForceFieldEvents(); - public void registerWorldEditEvents(); + void registerWorldEditEvents(); - public void registerTNTListener(); + void registerTNTListener(); - public EconHandler getEconomyHandler(); + EconHandler getEconomyHandler(); - public BlockManager initBlockManager(); + BlockManager initBlockManager(); - public EventUtil initEventUtil(); + EventUtil initEventUtil(); - public ChunkManager initChunkManager(); + ChunkManager initChunkManager(); - public SetupUtils initSetupUtils(); + SetupUtils initSetupUtils(); - public HybridUtils initHybridUtils(); + HybridUtils initHybridUtils(); - public UUIDHandlerImplementation initUUIDHandler(); + UUIDHandlerImplementation initUUIDHandler(); - public InventoryUtil initInventoryUtil(); + InventoryUtil initInventoryUtil(); - public boolean initPlotMeConverter(); + boolean initPlotMeConverter(); - public void unregister(PlotPlayer player); + void unregister(PlotPlayer player); - public PlotGenerator getGenerator(String world, String name); + PlotGenerator getGenerator(String world, String name); - public APlotListener initPlotListener(); + APlotListener initPlotListener(); - public void registerChunkProcessor(); + void registerChunkProcessor(); - public void registerWorldEvents(); + void registerWorldEvents(); - public PlayerManager initPlayerManager(); + PlayerManager initPlayerManager(); - public String getServerName(); + String getServerName(); } diff --git a/src/main/java/com/intellectualcrafters/plot/PS.java b/src/main/java/com/intellectualcrafters/plot/PS.java index dda181c75..44b9f394d 100644 --- a/src/main/java/com/intellectualcrafters/plot/PS.java +++ b/src/main/java/com/intellectualcrafters/plot/PS.java @@ -1,84 +1,34 @@ package com.intellectualcrafters.plot; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; +import com.intellectualcrafters.configuration.file.YamlConfiguration; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.config.Configuration; +import com.intellectualcrafters.plot.config.Settings; +import com.intellectualcrafters.plot.database.*; +import com.intellectualcrafters.plot.flag.AbstractFlag; +import com.intellectualcrafters.plot.flag.FlagManager; +import com.intellectualcrafters.plot.flag.FlagValue; +import com.intellectualcrafters.plot.generator.*; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.bukkit.listeners.APlotListener; +import com.plotsquared.bukkit.object.comment.CommentManager; +import com.plotsquared.bukkit.util.SetupUtils; +import com.sk89q.worldedit.bukkit.WorldEditPlugin; + +import java.io.*; import java.net.URL; import java.net.URLConnection; import java.nio.file.Files; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.SQLException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.Map.Entry; -import java.util.Set; -import java.util.UUID; import java.util.regex.Pattern; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; -import com.intellectualcrafters.configuration.file.YamlConfiguration; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.config.Configuration; -import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.database.Database; -import com.intellectualcrafters.plot.database.MySQL; -import com.intellectualcrafters.plot.database.SQLManager; -import com.intellectualcrafters.plot.database.SQLite; -import com.intellectualcrafters.plot.flag.AbstractFlag; -import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.flag.FlagValue; -import com.intellectualcrafters.plot.generator.ClassicPlotWorld; -import com.intellectualcrafters.plot.generator.HybridPlotWorld; -import com.intellectualcrafters.plot.generator.HybridUtils; -import com.intellectualcrafters.plot.generator.PlotGenerator; -import com.intellectualcrafters.plot.generator.SquarePlotManager; -import com.intellectualcrafters.plot.generator.SquarePlotWorld; -import com.plotsquared.bukkit.listeners.APlotListener; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotAnalysis; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotFilter; -import com.intellectualcrafters.plot.object.PlotHandler; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.plotsquared.bukkit.object.comment.CommentManager; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.intellectualcrafters.plot.util.ClusterManager; -import com.intellectualcrafters.plot.util.EconHandler; -import com.intellectualcrafters.plot.util.EventUtil; -import com.intellectualcrafters.plot.util.ExpireManager; -import com.intellectualcrafters.plot.util.InventoryUtil; -import com.intellectualcrafters.plot.util.MathMan; -import com.intellectualcrafters.plot.util.StringMan; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.PlayerManager; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.plotsquared.bukkit.util.SetupUtils; -import com.intellectualcrafters.plot.util.TaskManager; -import com.plotsquared.bukkit.util.bukkit.uuid.FileUUIDHandler; -import com.plotsquared.bukkit.util.bukkit.uuid.SQLUUIDHandler; -import com.sk89q.worldedit.bukkit.WorldEditPlugin; - /** * An implementation of the core, * with a static getter for easy access diff --git a/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java b/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java index b1e3188dc..88c978c1d 100644 --- a/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java +++ b/src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java @@ -21,15 +21,6 @@ package com.intellectualcrafters.plot.api; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Set; - -import org.bukkit.Location; -import org.bukkit.World; -import org.bukkit.entity.Player; -import org.bukkit.plugin.java.JavaPlugin; - import com.intellectualcrafters.configuration.file.YamlConfiguration; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.commands.MainCommand; @@ -37,21 +28,19 @@ import com.intellectualcrafters.plot.commands.SubCommand; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.flag.AbstractFlag; 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.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.intellectualcrafters.plot.util.ClusterManager; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.SchematicHandler; -import com.intellectualcrafters.plot.util.UUIDHandler; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.*; +import com.intellectualcrafters.plot.uuid.UUIDWrapper; import com.plotsquared.bukkit.util.bukkit.BukkitSetBlockManager; import com.plotsquared.bukkit.util.bukkit.BukkitUtil; -import com.intellectualcrafters.plot.uuid.UUIDWrapper; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Set; /** * PlotSquared API diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Add.java b/src/main/java/com/intellectualcrafters/plot/commands/Add.java index be4bd1caa..2b9f685b5 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Add.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Add.java @@ -20,8 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.UUID; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -32,10 +30,11 @@ import com.intellectualcrafters.plot.util.EventUtil; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; import com.plotsquared.bukkit.util.bukkit.uuid.SQLUUIDHandler; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.UUID; @CommandDeclaration( command = "add", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Auto.java b/src/main/java/com/intellectualcrafters/plot/commands/Auto.java index 3e9b8259e..cebe73e4b 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Auto.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Auto.java @@ -23,19 +23,12 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.util.ClusterManager; import com.intellectualcrafters.plot.util.EconHandler; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualsites.commands.CommandCaller; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "auto", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Buy.java b/src/main/java/com/intellectualcrafters/plot/commands/Buy.java index acb73954b..772049b33 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Buy.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Buy.java @@ -26,17 +26,11 @@ 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.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotHandler; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.util.EconHandler; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "buy", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Chat.java b/src/main/java/com/intellectualcrafters/plot/commands/Chat.java index b30d90a41..47902a4b8 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Chat.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Chat.java @@ -4,8 +4,7 @@ import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "chat", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Claim.java b/src/main/java/com/intellectualcrafters/plot/commands/Claim.java index f56592f69..2779aad09 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Claim.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Claim.java @@ -23,19 +23,10 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.RunnableVal; -import com.intellectualcrafters.plot.util.EconHandler; -import com.intellectualcrafters.plot.util.EventUtil; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.SchematicHandler; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.*; import com.intellectualcrafters.plot.util.SchematicHandler.Schematic; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "claim", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Clear.java b/src/main/java/com/intellectualcrafters/plot/commands/Clear.java index b64158bd5..3b59c8da0 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Clear.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Clear.java @@ -20,23 +20,17 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.Set; - import com.intellectualcrafters.plot.PS; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.CmdConfirm; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.Set; @CommandDeclaration( command = "clear", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java b/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java index 12545aa42..da1ce940e 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java @@ -20,34 +20,21 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.UUID; - -import org.bukkit.generator.ChunkGenerator; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.object.BlockLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotClusterId; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.util.ClusterManager; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.StringMan; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.CommandDeclaration; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.*; import com.plotsquared.bukkit.generator.AugmentedPopulator; -import com.plotsquared.bukkit.generator.BukkitGeneratorWrapper; import com.plotsquared.bukkit.generator.BukkitPlotGenerator; import com.plotsquared.bukkit.generator.HybridGen; import com.plotsquared.bukkit.util.SetupUtils; +import com.plotsquared.general.commands.CommandDeclaration; +import org.bukkit.generator.ChunkGenerator; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.UUID; @CommandDeclaration( command = "cluster", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Comment.java b/src/main/java/com/intellectualcrafters/plot/commands/Comment.java index 75aa91f00..e7f35cd84 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Comment.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Comment.java @@ -20,21 +20,19 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.Arrays; - -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; -import org.apache.commons.lang.StringUtils; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.comment.CommentInbox; -import com.plotsquared.bukkit.object.comment.CommentManager; import com.intellectualcrafters.plot.object.comment.PlotComment; import com.intellectualcrafters.plot.util.MainUtil; +import com.plotsquared.bukkit.object.comment.CommentManager; +import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; + +import java.util.Arrays; @CommandDeclaration( command = "comment", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Condense.java b/src/main/java/com/intellectualcrafters/plot/commands/Condense.java index 9f1bdc356..b6f0d84db 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Condense.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Condense.java @@ -20,23 +20,17 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; -import org.apache.commons.lang.StringUtils; - import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.BlockManager; import com.intellectualcrafters.plot.util.MainUtil; +import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; + +import java.util.*; +import java.util.Set; @CommandDeclaration( command = "condense", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Confirm.java b/src/main/java/com/intellectualcrafters/plot/commands/Confirm.java index ec06a7b4c..46f523ba9 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Confirm.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Confirm.java @@ -27,8 +27,7 @@ import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.CmdConfirm; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "confirm", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Copy.java b/src/main/java/com/intellectualcrafters/plot/commands/Copy.java index 9432a8a71..bd9f7118d 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Copy.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Copy.java @@ -27,9 +27,8 @@ import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "copy", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java b/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java index 066d61f24..815aa0666 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java @@ -28,8 +28,7 @@ import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "createroadschematic", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Database.java b/src/main/java/com/intellectualcrafters/plot/commands/Database.java index 1295c3fa7..1a63e67c1 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Database.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Database.java @@ -1,12 +1,6 @@ package com.intellectualcrafters.plot.commands; -import java.sql.Connection; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.UUID; - import com.intellectualcrafters.plot.PS; - import com.intellectualcrafters.plot.database.MySQL; import com.intellectualcrafters.plot.database.SQLManager; import com.intellectualcrafters.plot.object.Plot; @@ -15,8 +9,12 @@ import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.StringComparison; import com.intellectualcrafters.plot.util.TaskManager; import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.UUID; @CommandDeclaration( command = "database", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Debug.java b/src/main/java/com/intellectualcrafters/plot/commands/Debug.java index d97595a94..bb9de7836 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Debug.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Debug.java @@ -21,13 +21,11 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.PS; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.Lag; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "debug", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/DebugAllowUnsafe.java b/src/main/java/com/intellectualcrafters/plot/commands/DebugAllowUnsafe.java index 72e2594cb..e8d6e7678 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/DebugAllowUnsafe.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/DebugAllowUnsafe.java @@ -1,16 +1,13 @@ package com.intellectualcrafters.plot.commands; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; + import java.util.ArrayList; import java.util.List; import java.util.UUID; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; - @CommandDeclaration( command = "debugallowunsafe", description = "Allow unsafe actions until toggled off", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java b/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java index a155c6b1b..8e7687787 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java @@ -20,28 +20,16 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.UUID; - import com.google.common.collect.BiMap; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.StringWrapper; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.intellectualcrafters.plot.util.EventUtil; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.ArrayList; +import java.util.UUID; @CommandDeclaration( command = "debugclaimtest", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java b/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java index f242c92c0..5c1410c8f 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java @@ -21,19 +21,16 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.PS; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.generator.SquarePlotWorld; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.ChunkManager; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "debugclear", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java b/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java index cfd0a7058..58b28a349 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java @@ -20,39 +20,22 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.PrintWriter; -import java.sql.Timestamp; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.UUID; - - -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; - -import org.apache.commons.lang.StringUtils; -import org.bukkit.Bukkit; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.generator.BukkitHybridUtils; import com.intellectualcrafters.plot.generator.HybridUtils; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.OfflinePlotPlayer; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotAnalysis; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.RunnableVal; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.intellectualcrafters.plot.util.ExpireManager; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.UUIDHandler; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; +import org.bukkit.Bukkit; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.PrintWriter; +import java.sql.Timestamp; +import java.util.*; @CommandDeclaration( command = "debugexec", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/DebugFill.java b/src/main/java/com/intellectualcrafters/plot/commands/DebugFill.java index 4d8b932fc..756e1859e 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/DebugFill.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/DebugFill.java @@ -29,8 +29,7 @@ import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.SetBlockQueue; import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "fill", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/DebugFixFlags.java b/src/main/java/com/intellectualcrafters/plot/commands/DebugFixFlags.java index 33359a528..9f853f429 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/DebugFixFlags.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/DebugFixFlags.java @@ -20,10 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map.Entry; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -33,9 +29,12 @@ import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.BlockManager; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map.Entry; @CommandDeclaration( command = "debugfixflags", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java b/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java index 2e9a46d03..1e25364c9 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java @@ -20,14 +20,12 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.lang.reflect.Field; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.lang.reflect.Field; @CommandDeclaration( command = "debugloadtest", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/DebugPaste.java b/src/main/java/com/intellectualcrafters/plot/commands/DebugPaste.java index e8caf2358..49f88c653 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/DebugPaste.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/DebugPaste.java @@ -1,14 +1,12 @@ package com.intellectualcrafters.plot.commands; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.plotsquared.bukkit.BukkitMain; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.HastebinUtility; -import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.TaskManager; +import com.plotsquared.bukkit.BukkitMain; +import com.plotsquared.general.commands.CommandDeclaration; import org.bukkit.Bukkit; import org.bukkit.plugin.Plugin; diff --git a/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java b/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java index fdcd3e575..6b591d1f8 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java @@ -28,8 +28,7 @@ import com.intellectualcrafters.plot.object.ChunkLoc; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "debugroadregen", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java b/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java index fc20cd360..fb43aa9d3 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java @@ -20,15 +20,14 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.ArrayList; @CommandDeclaration( command = "debugsavetest", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/DebugUUID.java b/src/main/java/com/intellectualcrafters/plot/commands/DebugUUID.java index 73659aa92..6aa40082c 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/DebugUUID.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/DebugUUID.java @@ -20,20 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.io.File; -import java.io.FilenameFilter; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.UUID; - -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; - -import org.bukkit.Bukkit; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; @@ -51,6 +37,17 @@ import com.intellectualcrafters.plot.uuid.DefaultUUIDWrapper; import com.intellectualcrafters.plot.uuid.LowerOfflineUUIDWrapper; import com.intellectualcrafters.plot.uuid.OfflineUUIDWrapper; import com.intellectualcrafters.plot.uuid.UUIDWrapper; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; +import org.bukkit.Bukkit; + +import java.io.File; +import java.io.FilenameFilter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map.Entry; +import java.util.UUID; @CommandDeclaration( command = "uuidconvert", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Delete.java b/src/main/java/com/intellectualcrafters/plot/commands/Delete.java index e7173d9ee..e58c6f0ba 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Delete.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Delete.java @@ -27,14 +27,8 @@ import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.util.CmdConfirm; -import com.intellectualcrafters.plot.util.EconHandler; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "delete", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Deny.java b/src/main/java/com/intellectualcrafters/plot/commands/Deny.java index a31a98f92..4a2566731 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Deny.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Deny.java @@ -20,22 +20,17 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.UUID; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.EventUtil; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.*; import com.plotsquared.bukkit.util.bukkit.uuid.SQLUUIDHandler; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.UUID; @CommandDeclaration( command = "deny", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Download.java b/src/main/java/com/intellectualcrafters/plot/commands/Download.java index a0bb4491d..c75a0b63a 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Download.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Download.java @@ -1,7 +1,5 @@ package com.intellectualcrafters.plot.commands; -import java.net.URL; - import com.intellectualcrafters.jnbt.CompoundTag; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; @@ -13,8 +11,9 @@ import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.SchematicHandler; import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.net.URL; @CommandDeclaration( command = "download", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java b/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java index ee79da51f..d66de56f2 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java @@ -20,14 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; - -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; -import org.apache.commons.lang.StringUtils; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.flag.AbstractFlag; @@ -39,6 +31,12 @@ import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; +import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; @CommandDeclaration( command = "flag", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Help.java b/src/main/java/com/intellectualcrafters/plot/commands/Help.java index 7b4bc950f..f8956af2a 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Help.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Help.java @@ -7,8 +7,8 @@ */ package com.intellectualcrafters.plot.commands; -import com.intellectualsites.commands.CommandDeclaration; import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "help", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Home.java b/src/main/java/com/intellectualcrafters/plot/commands/Home.java index 5ff9f3564..bc990d0dc 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Home.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Home.java @@ -20,15 +20,14 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.ArrayList; @CommandDeclaration( command = "home", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java b/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java index 6a5b27acf..53a8123dd 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java @@ -20,22 +20,20 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.List; - -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; -import org.apache.commons.lang.StringUtils; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.RunnableVal; import com.intellectualcrafters.plot.object.comment.CommentInbox; -import com.plotsquared.bukkit.object.comment.CommentManager; import com.intellectualcrafters.plot.object.comment.PlotComment; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.StringMan; +import com.plotsquared.bukkit.object.comment.CommentManager; +import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; + +import java.util.ArrayList; +import java.util.List; @CommandDeclaration( command = "inbox", @@ -193,7 +191,7 @@ public class Inbox extends SubCommand { catch (NumberFormatException e) { sendMessage(player, C.COMMAND_SYNTAX, "/plot inbox [inbox] [delete |clear|page]"); return false; - }; + } } } } diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Info.java b/src/main/java/com/intellectualcrafters/plot/commands/Info.java index fd1f698a1..f9dd7da78 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Info.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Info.java @@ -20,32 +20,24 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.Collection; -import java.util.UUID; -import java.util.regex.Matcher; - - -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; - -import org.apache.commons.lang.StringUtils; - 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.plotsquared.bukkit.object.InfoInventory; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.StringMan; -import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualcrafters.plot.util.UUIDHandler; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.bukkit.object.InfoInventory; +import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.UUID; +import java.util.regex.Matcher; @CommandDeclaration( command = "info", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Kick.java b/src/main/java/com/intellectualcrafters/plot/commands/Kick.java index 739c664c8..b160b136d 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Kick.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Kick.java @@ -28,8 +28,7 @@ import com.intellectualcrafters.plot.util.BlockManager; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "kick", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Load.java b/src/main/java/com/intellectualcrafters/plot/commands/Load.java index 39313c8f3..fde42348d 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Load.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Load.java @@ -1,9 +1,5 @@ package com.intellectualcrafters.plot.commands; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.List; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; @@ -16,8 +12,11 @@ import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.SchematicHandler; import com.intellectualcrafters.plot.util.SchematicHandler.Schematic; import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.List; @CommandDeclaration( command = "load", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java b/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java index 3ab325f56..e0bbd8d97 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java @@ -20,11 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; @@ -37,10 +32,15 @@ import com.intellectualcrafters.plot.util.MathMan; import com.intellectualcrafters.plot.util.StringComparison; import com.intellectualcrafters.plot.util.StringMan; import com.intellectualcrafters.plot.util.helpmenu.HelpMenu; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.Command; -import com.intellectualsites.commands.CommandHandlingOutput; -import com.intellectualsites.commands.CommandManager; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.Command; +import com.plotsquared.general.commands.CommandHandlingOutput; +import com.plotsquared.general.commands.CommandManager; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; /** * PlotSquared command class diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Merge.java b/src/main/java/com/intellectualcrafters/plot/commands/Merge.java index 556b665fc..433b86740 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Merge.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Merge.java @@ -20,30 +20,18 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; + import java.util.ArrayList; import java.util.HashSet; import java.util.UUID; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; - -import org.apache.commons.lang.StringUtils; - -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.util.CmdConfirm; -import com.intellectualcrafters.plot.util.EconHandler; -import com.intellectualcrafters.plot.util.EventUtil; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.UUIDHandler; - @CommandDeclaration( command = "merge", aliases = {"m"}, diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Move.java b/src/main/java/com/intellectualcrafters/plot/commands/Move.java index 4204ec1bf..3de14163f 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Move.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Move.java @@ -22,16 +22,11 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "move", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java b/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java index 9a68c158d..4e337ce5a 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java @@ -23,16 +23,10 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotInventory; -import com.intellectualcrafters.plot.object.PlotItemStack; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.util.BlockManager; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "music", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Purge.java b/src/main/java/com/intellectualcrafters/plot/commands/Purge.java index 68be7e377..db5b1d9f1 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Purge.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Purge.java @@ -20,20 +20,20 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; @CommandDeclaration( diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Rate.java b/src/main/java/com/intellectualcrafters/plot/commands/Rate.java index a3bea463c..28aeeebf8 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Rate.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Rate.java @@ -20,32 +20,25 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.config.Settings; +import com.intellectualcrafters.plot.database.DBFunc; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.MainUtil; +import com.intellectualcrafters.plot.util.TaskManager; +import com.plotsquared.bukkit.events.PlotRateEvent; +import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.mutable.MutableInt; +import org.bukkit.Bukkit; + import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Map.Entry; import java.util.UUID; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.mutable.MutableInt; -import org.bukkit.Bukkit; - -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.database.DBFunc; -import com.plotsquared.bukkit.events.PlotRateEvent; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotInventory; -import com.intellectualcrafters.plot.object.PlotItemStack; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.Rating; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.TaskManager; - @CommandDeclaration( command = "rate", permission = "plots.rate", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java b/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java index 9b7df48f7..714de1c64 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java @@ -20,8 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.List; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.generator.HybridPlotManager; @@ -31,9 +29,10 @@ import com.intellectualcrafters.plot.object.PlotManager; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.ChunkManager; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.List; @CommandDeclaration( command = "regenallroads", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Reload.java b/src/main/java/com/intellectualcrafters/plot/commands/Reload.java index 59f34b3b9..ea90917b8 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Reload.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Reload.java @@ -22,10 +22,10 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualsites.commands.CommandDeclaration; import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.MainUtil; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "reload", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Remove.java b/src/main/java/com/intellectualcrafters/plot/commands/Remove.java index 0179e78f5..21444db3b 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Remove.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Remove.java @@ -20,10 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.UUID; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; @@ -31,9 +27,13 @@ import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; import com.plotsquared.bukkit.util.bukkit.uuid.SQLUUIDHandler; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.UUID; @CommandDeclaration( command = "remove", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/RequiredType.java b/src/main/java/com/intellectualcrafters/plot/commands/RequiredType.java index c6a86bb23..30b9a4e44 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/RequiredType.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/RequiredType.java @@ -1,6 +1,6 @@ package com.intellectualcrafters.plot.commands; -import com.intellectualsites.commands.CommandCaller; +import com.plotsquared.general.commands.CommandCaller; public enum RequiredType { CONSOLE, diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Save.java b/src/main/java/com/intellectualcrafters/plot/commands/Save.java index dd1200b23..c967d3231 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Save.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Save.java @@ -1,9 +1,5 @@ package com.intellectualcrafters.plot.commands; -import java.net.URL; -import java.util.List; -import java.util.UUID; - import com.intellectualcrafters.jnbt.CompoundTag; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; @@ -16,8 +12,11 @@ import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.SchematicHandler; import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.net.URL; +import java.util.List; +import java.util.UUID; @CommandDeclaration( command = "save", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/SchematicCmd.java b/src/main/java/com/intellectualcrafters/plot/commands/SchematicCmd.java index 12d7efc36..967ef1ea5 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/SchematicCmd.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/SchematicCmd.java @@ -20,28 +20,22 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.net.URL; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.UUID; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.object.ConsolePlayer; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.RunnableVal; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.SchematicHandler; import com.intellectualcrafters.plot.util.SchematicHandler.Schematic; import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.net.URL; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.UUID; // TODO Add sub-subcommands diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Set.java b/src/main/java/com/intellectualcrafters/plot/commands/Set.java index f85098bd1..96dcbecd1 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Set.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Set.java @@ -20,37 +20,21 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; - -import org.apache.commons.lang.StringUtils; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Configuration; import com.intellectualcrafters.plot.flag.AbstractFlag; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.*; import com.plotsquared.bukkit.listeners.APlotListener; -import com.intellectualcrafters.plot.object.BlockLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.StringWrapper; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.SetBlockQueue; -import com.intellectualcrafters.plot.util.StringComparison; -import com.intellectualcrafters.plot.util.StringMan; -import com.intellectualcrafters.plot.util.UUIDHandler; +import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; // TODO Make sub-subcommands diff --git a/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java b/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java index d428c5858..897c8a101 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java @@ -20,9 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.UUID; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; @@ -34,9 +31,11 @@ import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.ArrayList; +import java.util.UUID; @CommandDeclaration( command = "setowner", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Setup.java b/src/main/java/com/intellectualcrafters/plot/commands/Setup.java index 77f4e16d1..58df0ea0c 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Setup.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Setup.java @@ -20,30 +20,24 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map.Entry; - - - -import com.intellectualsites.commands.CommandCaller; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; - -import org.apache.commons.lang.StringUtils; -import org.bukkit.generator.ChunkGenerator; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.ConfigurationNode; import com.intellectualcrafters.plot.config.Settings; -import com.plotsquared.bukkit.generator.BukkitPlotGenerator; -import com.plotsquared.bukkit.generator.HybridGen; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.SetupObject; import com.intellectualcrafters.plot.util.BlockManager; import com.intellectualcrafters.plot.util.MainUtil; +import com.plotsquared.bukkit.generator.BukkitPlotGenerator; +import com.plotsquared.bukkit.generator.HybridGen; import com.plotsquared.bukkit.util.SetupUtils; +import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; +import org.bukkit.generator.ChunkGenerator; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map.Entry; @CommandDeclaration( command = "setup", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/SubCommand.java b/src/main/java/com/intellectualcrafters/plot/commands/SubCommand.java index 1a02ee08e..3ea1ca413 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/SubCommand.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/SubCommand.java @@ -22,7 +22,6 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.MainUtil; /** * SubCommand class @@ -30,7 +29,7 @@ import com.intellectualcrafters.plot.util.MainUtil; * @author Citymonstret */ @SuppressWarnings({ "deprecation", "unused" }) -public abstract class SubCommand extends com.intellectualsites.commands.Command { +public abstract class SubCommand extends com.plotsquared.general.commands.Command { /** * The category diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Swap.java b/src/main/java/com/intellectualcrafters/plot/commands/Swap.java index 8e4a634ff..c825eb68b 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Swap.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Swap.java @@ -20,21 +20,15 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; - import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotClusterId; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.util.ChunkManager; import com.intellectualcrafters.plot.util.ClusterManager; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.ArrayList; @CommandDeclaration( command = "swap", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/TP.java b/src/main/java/com/intellectualcrafters/plot/commands/TP.java index 7a9434e06..db7aa565d 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/TP.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/TP.java @@ -20,12 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; - -import org.apache.commons.lang.StringUtils; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Location; @@ -35,6 +29,9 @@ import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.BlockManager; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.UUIDHandler; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; @CommandDeclaration( command = "tp", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Target.java b/src/main/java/com/intellectualcrafters/plot/commands/Target.java index 0b7a8b7ca..8c4782596 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Target.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Target.java @@ -26,9 +26,8 @@ import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "target", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Template.java b/src/main/java/com/intellectualcrafters/plot/commands/Template.java index 6248eac52..a29e719d7 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Template.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Template.java @@ -20,6 +20,18 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; +import com.intellectualcrafters.configuration.ConfigurationSection; +import com.intellectualcrafters.configuration.file.YamlConfiguration; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.config.ConfigurationNode; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.BlockManager; +import com.intellectualcrafters.plot.util.MainUtil; +import com.intellectualcrafters.plot.util.TaskManager; +import com.plotsquared.bukkit.util.SetupUtils; +import com.plotsquared.general.commands.CommandDeclaration; + import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -29,23 +41,6 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; -import com.intellectualcrafters.configuration.ConfigurationSection; -import com.intellectualcrafters.configuration.file.YamlConfiguration; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.config.ConfigurationNode; -import com.intellectualcrafters.plot.object.FileBytes; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.SetupObject; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.plotsquared.bukkit.util.SetupUtils; -import com.intellectualcrafters.plot.util.TaskManager; - @CommandDeclaration( command = "template", permission = "plots.admin", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Toggle.java b/src/main/java/com/intellectualcrafters/plot/commands/Toggle.java index 5cd5b30f0..b1c128aee 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Toggle.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Toggle.java @@ -23,8 +23,7 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; // TOGGLE("toggle", "attribute"), diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Trim.java b/src/main/java/com/intellectualcrafters/plot/commands/Trim.java index f44d02405..b8d4fdaad 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Trim.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Trim.java @@ -20,6 +20,15 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.BlockManager; +import com.intellectualcrafters.plot.util.ChunkManager; +import com.intellectualcrafters.plot.util.MainUtil; +import com.intellectualcrafters.plot.util.TaskManager; +import com.plotsquared.general.commands.CommandDeclaration; + import java.io.File; import java.nio.file.Files; import java.nio.file.Path; @@ -28,20 +37,6 @@ import java.nio.file.attribute.BasicFileAttributes; import java.util.ArrayList; import java.util.HashSet; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; - @CommandDeclaration( command = "trim", permission = "plots.admin", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Trust.java b/src/main/java/com/intellectualcrafters/plot/commands/Trust.java index af57dd884..94b935622 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Trust.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Trust.java @@ -20,8 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.UUID; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -32,10 +30,11 @@ import com.intellectualcrafters.plot.util.EventUtil; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; import com.plotsquared.bukkit.util.bukkit.uuid.SQLUUIDHandler; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.UUID; @CommandDeclaration( command = "trust", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java b/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java index 91e01aebd..4572c5406 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java @@ -29,8 +29,7 @@ import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.EconHandler; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "unclaim", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Undeny.java b/src/main/java/com/intellectualcrafters/plot/commands/Undeny.java index 8807242ee..345d3f9d2 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Undeny.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Undeny.java @@ -20,9 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.UUID; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; @@ -30,10 +27,12 @@ import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; import com.plotsquared.bukkit.util.bukkit.uuid.SQLUUIDHandler; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.ArrayList; +import java.util.UUID; @CommandDeclaration( command = "undeny", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java b/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java index 5d4da5e70..a2d98c67b 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java @@ -29,8 +29,7 @@ import com.intellectualcrafters.plot.util.CmdConfirm; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "unlink", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Untrust.java b/src/main/java/com/intellectualcrafters/plot/commands/Untrust.java index 516e5a2c5..0d3a0eb88 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Untrust.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Untrust.java @@ -20,9 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.UUID; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; @@ -30,9 +27,11 @@ import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.ArrayList; +import java.util.UUID; // UNTRUST("untrust", "ut"), diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Update.java b/src/main/java/com/intellectualcrafters/plot/commands/Update.java index f0d13d158..ca5c6d5f0 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Update.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Update.java @@ -20,15 +20,14 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.net.MalformedURLException; -import java.net.URL; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; - -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualsites.commands.CommandDeclaration; import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.net.MalformedURLException; +import java.net.URL; @CommandDeclaration( command = "update", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Visit.java b/src/main/java/com/intellectualcrafters/plot/commands/Visit.java index 6c38590e3..1b21cbfd5 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Visit.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Visit.java @@ -20,10 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; @@ -31,9 +27,12 @@ import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.CommandDeclaration; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; @CommandDeclaration( command = "visit", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java b/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java index 1afcd4ccc..03dec7984 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java @@ -22,12 +22,11 @@ package com.intellectualcrafters.plot.commands; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.plotsquared.bukkit.listeners.worldedit.WEManager; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; +import com.plotsquared.bukkit.listeners.worldedit.WEManager; +import com.plotsquared.general.commands.CommandDeclaration; @CommandDeclaration( command = "weanywhere", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/list.java b/src/main/java/com/intellectualcrafters/plot/commands/list.java index ac7115d52..2cc0354ec 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/list.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/list.java @@ -20,37 +20,23 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; -import java.util.Map.Entry; -import java.util.Set; -import java.util.UUID; - - -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; - -import org.apache.commons.lang.StringUtils; -import org.bukkit.ChatColor; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; -import com.plotsquared.bukkit.object.BukkitPlayer; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.Rating; -import com.intellectualcrafters.plot.util.EconHandler; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.StringComparison; -import com.intellectualcrafters.plot.util.UUIDHandler; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.bukkit.object.BukkitPlayer; import com.plotsquared.bukkit.util.bukkit.chat.FancyMessage; +import com.plotsquared.general.commands.CommandDeclaration; +import org.apache.commons.lang.StringUtils; +import org.bukkit.ChatColor; + +import java.util.*; +import java.util.Map.Entry; @CommandDeclaration( command = "list", diff --git a/src/main/java/com/intellectualcrafters/plot/commands/plugin.java b/src/main/java/com/intellectualcrafters/plot/commands/plugin.java index de119a711..798924a71 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/plugin.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/plugin.java @@ -20,22 +20,17 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.TaskManager; +import com.plotsquared.general.commands.CommandDeclaration; + import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; -import com.intellectualcrafters.plot.PS; - -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.StringMan; -import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualsites.commands.CommandDeclaration; -import com.intellectualcrafters.plot.object.PlotPlayer; - @CommandDeclaration( command = "plugin", permission = "plots.use", diff --git a/src/main/java/com/intellectualcrafters/plot/config/C.java b/src/main/java/com/intellectualcrafters/plot/config/C.java index 24721edb1..05fe7652f 100644 --- a/src/main/java/com/intellectualcrafters/plot/config/C.java +++ b/src/main/java/com/intellectualcrafters/plot/config/C.java @@ -20,23 +20,16 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.config; -import java.io.File; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Set; - -import org.bukkit.ChatColor; - import com.intellectualcrafters.configuration.ConfigurationSection; import com.intellectualcrafters.configuration.file.YamlConfiguration; import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.StringMan; -import com.intellectualsites.commands.CommandCaller; +import com.plotsquared.general.commands.CommandCaller; +import org.bukkit.ChatColor; + +import java.io.File; +import java.util.*; /** * Captions class. diff --git a/src/main/java/com/intellectualcrafters/plot/config/Configuration.java b/src/main/java/com/intellectualcrafters/plot/config/Configuration.java index 13e04a0ed..b5715c208 100644 --- a/src/main/java/com/intellectualcrafters/plot/config/Configuration.java +++ b/src/main/java/com/intellectualcrafters/plot/config/Configuration.java @@ -20,12 +20,12 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.config; -import java.util.ArrayList; - import com.intellectualcrafters.plot.object.PlotBlock; import com.intellectualcrafters.plot.util.BlockManager; import com.intellectualcrafters.plot.util.StringComparison; +import java.util.ArrayList; + /** * Main Configuration Utility * @@ -109,10 +109,7 @@ public class Configuration { public boolean validateValue(final String string) { try { final int biome = BlockManager.manager.getBiomeFromString(string.toUpperCase()); - if (biome == -1) { - return false; - } - return true; + return biome != -1; } catch (final Exception e) { return false; } diff --git a/src/main/java/com/intellectualcrafters/plot/config/ConfigurationNode.java b/src/main/java/com/intellectualcrafters/plot/config/ConfigurationNode.java index c6bb2259e..3fb6d5952 100644 --- a/src/main/java/com/intellectualcrafters/plot/config/ConfigurationNode.java +++ b/src/main/java/com/intellectualcrafters/plot/config/ConfigurationNode.java @@ -20,14 +20,14 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.config; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - import com.intellectualcrafters.plot.config.Configuration.SettingValue; import com.intellectualcrafters.plot.object.PlotBlock; import com.intellectualcrafters.plot.util.StringMan; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + /** * Configuration Node * diff --git a/src/main/java/com/intellectualcrafters/plot/database/AbstractDB.java b/src/main/java/com/intellectualcrafters/plot/database/AbstractDB.java index cfda18743..083030c13 100644 --- a/src/main/java/com/intellectualcrafters/plot/database/AbstractDB.java +++ b/src/main/java/com/intellectualcrafters/plot/database/AbstractDB.java @@ -20,23 +20,13 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.database; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.Set; -import java.util.UUID; - import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotClusterId; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.RunnableVal; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.object.comment.PlotComment; +import java.sql.SQLException; +import java.util.*; + /** * @author Citymonstret * @author Empire92 @@ -46,7 +36,7 @@ public interface AbstractDB { /** * The UUID that will count as everyone */ - public UUID everyone = UUID.fromString("1-1-3-3-7"); + UUID everyone = UUID.fromString("1-1-3-3-7"); /** * Set Plot owner @@ -54,21 +44,21 @@ public interface AbstractDB { * @param plot Plot in which the owner should be set * @param uuid The uuid of the new owner */ - public void setOwner(final Plot plot, final UUID uuid); + void setOwner(final Plot plot, final UUID uuid); /** * Create all settings, and create default helpers, trusted + denied lists * * @param plots Plots for which the default table entries should be created */ - public void createPlotsAndData(final ArrayList plots, Runnable whenDone); + void createPlotsAndData(final ArrayList plots, Runnable whenDone); /** * Create a plot * * @param plot That should be created */ - public void createPlot(final Plot plot); + void createPlot(final Plot plot); /** * Create tables @@ -77,16 +67,16 @@ public interface AbstractDB { * * @throws SQLException If the database manager is unable to create the tables */ - public void createTables(final String database) throws Exception; + void createTables(final String database) throws Exception; /** * Delete a plot * * @param plot Plot that should be deleted */ - public void delete(final Plot plot); + void delete(final Plot plot); - public void delete(final PlotCluster cluster); + void delete(final PlotCluster cluster); /** * Create plot settings @@ -94,7 +84,7 @@ public interface AbstractDB { * @param id Plot Entry ID * @param plot Plot Object */ - public void createPlotSettings(final int id, final Plot plot); + void createPlotSettings(final int id, final Plot plot); /** * Get the table entry ID @@ -104,7 +94,7 @@ public interface AbstractDB { * * @return Integer = Plot Entry Id */ - public int getId(final String world, final PlotId id2); + int getId(final String world, final PlotId id2); /** * Get the id of a given plot cluster @@ -114,17 +104,17 @@ public interface AbstractDB { * * @return Integer = Cluster Entry Id */ - public int getClusterId(final String world, final PlotClusterId id); + int getClusterId(final String world, final PlotClusterId id); /** * @return A linked hashmap containing all plots */ - public LinkedHashMap> getPlots(); + LinkedHashMap> getPlots(); /** * @return A hashmap containing all plot clusters */ - public HashMap> getClusters(); + HashMap> getClusters(); /** * Set the merged status for a plot @@ -133,14 +123,14 @@ public interface AbstractDB { * @param plot Plot Object * @param merged boolean[] */ - public void setMerged(final Plot plot, final boolean[] merged); + void setMerged(final Plot plot, final boolean[] merged); /** * Swap the settings, helpers etc. of two plots * @param p1 Plot1 * @param p2 Plot2 */ - public void swapPlots(final Plot p1, final Plot p2); + void swapPlots(final Plot p1, final Plot p2); /** * Set plot flags @@ -149,7 +139,7 @@ public interface AbstractDB { * @param plot Plot Object * @param flags flags to set (flag[]) */ - public void setFlags(final Plot plot, final Collection flags); + void setFlags(final Plot plot, final Collection flags); /** * Set cluster flags @@ -157,12 +147,12 @@ public interface AbstractDB { * @param cluster PlotCluster Object * @param flags flags to set (flag[]) */ - public void setFlags(final PlotCluster cluster, final Collection flags); + void setFlags(final PlotCluster cluster, final Collection flags); /** * Rename a cluster */ - public void setClusterName(final PlotCluster cluster, final String name); + void setClusterName(final PlotCluster cluster, final String name); /** * Set the plot alias @@ -170,7 +160,7 @@ public interface AbstractDB { * @param plot Plot for which the alias should be set * @param alias Plot Alias */ - public void setAlias(final Plot plot, final String alias); + void setAlias(final Plot plot, final String alias); /** * Purgle a plot @@ -178,14 +168,14 @@ public interface AbstractDB { * @param world World in which the plot is located * @param uniqueIds list of plot id (db) to be purged */ - public void purgeIds(final String world, final Set uniqueIds); + void purgeIds(final String world, final Set uniqueIds); /** * Purge a whole world * * @param world World in which the plots should be purged */ - public void purge(final String world, final Set plotIds); + void purge(final String world, final Set plotIds); /** * Set Plot Home Position @@ -193,71 +183,71 @@ public interface AbstractDB { * @param plot Plot Object * @param position Plot Home Position */ - public void setPosition(final Plot plot, final String position); + void setPosition(final Plot plot, final String position); /** * * @param cluster * @param position */ - public void setPosition(final PlotCluster cluster, final String position); + void setPosition(final PlotCluster cluster, final String position); /** * @param id Plot Entry ID * * @return Plot Settings */ - public HashMap getSettings(final int id); + HashMap getSettings(final int id); /** * * @param id * @return HashMap */ - public HashMap getClusterSettings(final int id); + HashMap getClusterSettings(final int id); /** * @param plot Plot Object * @param uuid Player that should be removed */ - public void removeTrusted(final Plot plot, final UUID uuid); + void removeTrusted(final Plot plot, final UUID uuid); /** * @param cluster PlotCluster Object * @param uuid Player that should be removed */ - public void removeHelper(final PlotCluster cluster, final UUID uuid); + void removeHelper(final PlotCluster cluster, final UUID uuid); /** * @param plot Plot Object * @param uuid Player that should be removed */ - public void removeMember(final Plot plot, final UUID uuid); + void removeMember(final Plot plot, final UUID uuid); /** * * @param cluster * @param uuid */ - public void removeInvited(final PlotCluster cluster, final UUID uuid); + void removeInvited(final PlotCluster cluster, final UUID uuid); /** * @param plot Plot Object * @param uuid Player that should be removed */ - public void setTrusted(final Plot plot, final UUID uuid); + void setTrusted(final Plot plot, final UUID uuid); /** * @param cluster PlotCluster Object * @param uuid Player that should be removed */ - public void setHelper(final PlotCluster cluster, final UUID uuid); + void setHelper(final PlotCluster cluster, final UUID uuid); /** * @param plot Plot Object * @param uuid Player that should be added */ - public void setMember(final Plot plot, final UUID uuid); + void setMember(final Plot plot, final UUID uuid); /** * @@ -265,19 +255,19 @@ public interface AbstractDB { * @param cluster * @param uuid */ - public void setInvited(final PlotCluster cluster, final UUID uuid); + void setInvited(final PlotCluster cluster, final UUID uuid); /** * @param plot Plot Object * @param uuid Player uuid */ - public void removeDenied(final Plot plot, final UUID uuid); + void removeDenied(final Plot plot, final UUID uuid); /** * @param plot Plot Object * @param uuid Player uuid that should be added */ - public void setDenied(final Plot plot, final UUID uuid); + void setDenied(final Plot plot, final UUID uuid); /** * Get Plots ratings @@ -286,7 +276,7 @@ public interface AbstractDB { * * @return Plot Ratings (pre-calculated) */ - public HashMap getRatings(final Plot plot); + HashMap getRatings(final Plot plot); /** * Set a rating for a plot @@ -294,7 +284,7 @@ public interface AbstractDB { * @param rater * @param value */ - public void setRating(final Plot plot, UUID rater, int value); + void setRating(final Plot plot, UUID rater, int value); /** * Remove a plot comment @@ -303,14 +293,14 @@ public interface AbstractDB { * @param plot Plot Object * @param comment Comment to remove */ - public void removeComment(final Plot plot, final PlotComment comment); + void removeComment(final Plot plot, final PlotComment comment); /** * Clear an inbox * @param plot * @param inbox */ - public void clearInbox(Plot plot, String inbox); + void clearInbox(Plot plot, String inbox); /** * Set a plot comment @@ -319,7 +309,7 @@ public interface AbstractDB { * @param plot Plot Object * @param comment Comment to add */ - public void setComment(final Plot plot, final PlotComment comment); + void setComment(final Plot plot, final PlotComment comment); /** * Get Plot Comments @@ -330,18 +320,18 @@ public interface AbstractDB { * * @return Plot Comments within the specified tier */ - public void getComments(final Plot plot, final String inbox, RunnableVal whenDone); + void getComments(final Plot plot, final String inbox, RunnableVal whenDone); - public void createPlotAndSettings(Plot plot); + void createPlotAndSettings(Plot plot); - public void createCluster(PlotCluster cluster); + void createCluster(PlotCluster cluster); - public void resizeCluster(PlotCluster current, PlotClusterId resize); + void resizeCluster(PlotCluster current, PlotClusterId resize); - public void movePlot(Plot originalPlot, Plot newPlot); + void movePlot(Plot originalPlot, Plot newPlot); /** * Don't fuck with this one, unless you enjoy it rough */ - public boolean deleteTables(); + boolean deleteTables(); } diff --git a/src/main/java/com/intellectualcrafters/plot/database/DBFunc.java b/src/main/java/com/intellectualcrafters/plot/database/DBFunc.java index df7da0c27..a994566f2 100644 --- a/src/main/java/com/intellectualcrafters/plot/database/DBFunc.java +++ b/src/main/java/com/intellectualcrafters/plot/database/DBFunc.java @@ -20,24 +20,14 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.database; +import com.intellectualcrafters.plot.flag.Flag; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.object.comment.PlotComment; + import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.Set; -import java.util.UUID; - -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotClusterId; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.RunnableVal; -import com.intellectualcrafters.plot.object.comment.PlotComment; +import java.util.*; /** * DB Functions diff --git a/src/main/java/com/intellectualcrafters/plot/database/MySQL.java b/src/main/java/com/intellectualcrafters/plot/database/MySQL.java index 60119f692..5f973aefa 100644 --- a/src/main/java/com/intellectualcrafters/plot/database/MySQL.java +++ b/src/main/java/com/intellectualcrafters/plot/database/MySQL.java @@ -20,11 +20,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.database; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; +import java.sql.*; /** * Connects to and uses a MySQL database diff --git a/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java b/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java index 31e3abd87..a216c24bc 100644 --- a/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java +++ b/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java @@ -20,40 +20,19 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// 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.sql.Timestamp; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Set; -import java.util.UUID; - -import org.bukkit.block.Biome; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.object.BlockLoc; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotClusterId; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotSettings; -import com.intellectualcrafters.plot.object.RunnableVal; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.object.comment.PlotComment; import com.intellectualcrafters.plot.util.ClusterManager; import com.intellectualcrafters.plot.util.StringMan; import com.intellectualcrafters.plot.util.TaskManager; +import org.bukkit.block.Biome; + +import java.sql.*; +import java.util.*; /** * @author Citymonstret @@ -877,7 +856,7 @@ public class SQLManager implements AbstractDB { } rs.close(); - try (Statement statement = connection.createStatement();) { + try (Statement statement = connection.createStatement()) { for (String table : new String[]{"plot_denied", "plot_helpers", "plot_trusted"} ) { ResultSet result = statement.executeQuery("SELECT plot_plot_id, user_uuid, COUNT(*) FROM " + this.prefix + table + " GROUP BY plot_plot_id, user_uuid HAVING COUNT(*) > 1"); if (result.next()) { diff --git a/src/main/java/com/intellectualcrafters/plot/database/SQLite.java b/src/main/java/com/intellectualcrafters/plot/database/SQLite.java index b7f6f0185..00fca9c9c 100644 --- a/src/main/java/com/intellectualcrafters/plot/database/SQLite.java +++ b/src/main/java/com/intellectualcrafters/plot/database/SQLite.java @@ -20,15 +20,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.database; +import com.intellectualcrafters.plot.PS; + import java.io.File; import java.io.IOException; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -import com.intellectualcrafters.plot.PS; +import java.sql.*; /** * Connects to and uses a SQLite database diff --git a/src/main/java/com/intellectualcrafters/plot/database/StmtMod.java b/src/main/java/com/intellectualcrafters/plot/database/StmtMod.java index 2aaa21c6c..4f6363039 100644 --- a/src/main/java/com/intellectualcrafters/plot/database/StmtMod.java +++ b/src/main/java/com/intellectualcrafters/plot/database/StmtMod.java @@ -1,10 +1,10 @@ package com.intellectualcrafters.plot.database; +import com.intellectualcrafters.plot.util.StringMan; + import java.sql.PreparedStatement; import java.sql.SQLException; -import com.intellectualcrafters.plot.util.StringMan; - public abstract class StmtMod { public abstract String getCreateMySQL(int size); diff --git a/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java b/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java index daa6109a4..b65a041bc 100644 --- a/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java +++ b/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java @@ -20,19 +20,15 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.flag; -import java.util.*; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotSettings; -import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.util.EventUtil; import com.intellectualcrafters.plot.util.MainUtil; +import java.util.*; + /** * Flag Manager Utility * @@ -162,10 +158,7 @@ public class FlagManager { return false; } final Flag flag = getPlotFlag(plot, strFlag); - if (flag == null || !((Boolean) flag.getValue())) { - return false; - } - return true; + return !(flag == null || !((Boolean) flag.getValue())); } public static boolean isPlotFlagFalse(final Plot plot, final String strFlag) { diff --git a/src/main/java/com/intellectualcrafters/plot/flag/FlagValue.java b/src/main/java/com/intellectualcrafters/plot/flag/FlagValue.java index f4b09ae9a..d89ea52f1 100644 --- a/src/main/java/com/intellectualcrafters/plot/flag/FlagValue.java +++ b/src/main/java/com/intellectualcrafters/plot/flag/FlagValue.java @@ -1,13 +1,13 @@ package com.intellectualcrafters.plot.flag; +import com.intellectualcrafters.plot.object.PlotBlock; +import com.intellectualcrafters.plot.util.StringMan; + import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.util.StringMan; - /** * Created 2014-11-17 for PlotSquared * @@ -288,9 +288,9 @@ public abstract class FlagValue { } public interface ListValue { - public void add(Object t, String value); + void add(Object t, String value); - public void remove(Object t, String value); + void remove(Object t, String value); } public static class PlotBlockListValue extends FlagValue> implements ListValue { diff --git a/src/main/java/com/intellectualcrafters/plot/generator/BukkitHybridUtils.java b/src/main/java/com/intellectualcrafters/plot/generator/BukkitHybridUtils.java index 5a802389d..6f40771ac 100644 --- a/src/main/java/com/intellectualcrafters/plot/generator/BukkitHybridUtils.java +++ b/src/main/java/com/intellectualcrafters/plot/generator/BukkitHybridUtils.java @@ -1,14 +1,17 @@ package com.intellectualcrafters.plot.generator; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Random; -import java.util.concurrent.atomic.AtomicInteger; - +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.flag.Flag; +import com.intellectualcrafters.plot.flag.FlagManager; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.ChunkManager; +import com.intellectualcrafters.plot.util.MainUtil; +import com.intellectualcrafters.plot.util.MathMan; +import com.intellectualcrafters.plot.util.TaskManager; +import com.plotsquared.bukkit.BukkitMain; import com.plotsquared.bukkit.generator.AugmentedPopulator; - +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.Material; @@ -21,23 +24,8 @@ import org.bukkit.material.Directional; import org.bukkit.material.MaterialData; import org.bukkit.plugin.Plugin; -import com.plotsquared.bukkit.BukkitMain; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotAnalysis; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.RunnableVal; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.MathMan; -import com.intellectualcrafters.plot.util.TaskManager; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; public class BukkitHybridUtils extends HybridUtils { diff --git a/src/main/java/com/intellectualcrafters/plot/generator/ClassicPlotManager.java b/src/main/java/com/intellectualcrafters/plot/generator/ClassicPlotManager.java index 6cd51ce4a..04002d3e4 100644 --- a/src/main/java/com/intellectualcrafters/plot/generator/ClassicPlotManager.java +++ b/src/main/java/com/intellectualcrafters/plot/generator/ClassicPlotManager.java @@ -1,16 +1,11 @@ package com.intellectualcrafters.plot.generator; -import java.util.ArrayList; - -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.PseudoRandom; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.SetBlockQueue; +import java.util.ArrayList; + /** * A plot manager with square plots which tesselate on a square grid with the following sections: ROAD, WALL, BORDER (wall), PLOT, FLOOR (plot) */ diff --git a/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotManager.java b/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotManager.java index b112af03e..bbbc6e045 100644 --- a/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotManager.java +++ b/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotManager.java @@ -20,6 +20,14 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.generator; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.commands.Template; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.ChunkManager; +import com.intellectualcrafters.plot.util.MainUtil; +import com.intellectualcrafters.plot.util.SetBlockQueue; +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; + import java.io.File; import java.io.IOException; import java.nio.file.Files; @@ -27,21 +35,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.commands.Template; -import com.intellectualcrafters.plot.object.FileBytes; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotLoc; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.RunnableVal; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.SetBlockQueue; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; - public class HybridPlotManager extends ClassicPlotManager { @Override diff --git a/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotWorld.java b/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotWorld.java index b4914a39c..204944545 100644 --- a/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotWorld.java +++ b/src/main/java/com/intellectualcrafters/plot/generator/HybridPlotWorld.java @@ -20,9 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.generator; -import java.util.HashMap; -import java.util.HashSet; - import com.intellectualcrafters.configuration.ConfigurationSection; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; @@ -30,10 +27,12 @@ import com.intellectualcrafters.plot.object.PlotBlock; import com.intellectualcrafters.plot.object.PlotLoc; import com.intellectualcrafters.plot.object.schematic.PlotItem; 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.SchematicHandler.Schematic; +import java.util.HashMap; +import java.util.HashSet; + public class HybridPlotWorld extends ClassicPlotWorld { public boolean ROAD_SCHEMATIC_ENABLED; public short SCHEMATIC_HEIGHT; diff --git a/src/main/java/com/intellectualcrafters/plot/generator/HybridPop.java b/src/main/java/com/intellectualcrafters/plot/generator/HybridPop.java index 5f6fb7e16..6b808bcfd 100644 --- a/src/main/java/com/intellectualcrafters/plot/generator/HybridPop.java +++ b/src/main/java/com/intellectualcrafters/plot/generator/HybridPop.java @@ -1,19 +1,18 @@ package com.intellectualcrafters.plot.generator; -import java.util.HashMap; -import java.util.HashSet; - -import org.bukkit.World; -import org.bukkit.block.Biome; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.object.PlotLoc; -import com.plotsquared.bukkit.object.PlotPopulator; import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.object.PseudoRandom; import com.intellectualcrafters.plot.object.RegionWrapper; import com.intellectualcrafters.plot.object.schematic.PlotItem; import com.intellectualcrafters.plot.util.BlockManager; +import com.plotsquared.bukkit.object.PlotPopulator; +import org.bukkit.World; +import org.bukkit.block.Biome; + +import java.util.HashMap; +import java.util.HashSet; /** * @author Citymonstret diff --git a/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java b/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java index 912f74cb3..619a4dfaf 100644 --- a/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java +++ b/src/main/java/com/intellectualcrafters/plot/generator/HybridUtils.java @@ -1,24 +1,16 @@ package com.intellectualcrafters.plot.generator; -import java.io.File; -import java.util.HashMap; - import com.intellectualcrafters.jnbt.CompoundTag; import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotAnalysis; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotLoc; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.RunnableVal; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.util.BlockManager; import com.intellectualcrafters.plot.util.ChunkManager; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.SchematicHandler; +import java.io.File; +import java.util.HashMap; + public abstract class HybridUtils { public static HybridUtils manager; diff --git a/src/main/java/com/intellectualcrafters/plot/object/ConsolePlayer.java b/src/main/java/com/intellectualcrafters/plot/object/ConsolePlayer.java index 2407dea3d..96ffcb7de 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/ConsolePlayer.java +++ b/src/main/java/com/intellectualcrafters/plot/object/ConsolePlayer.java @@ -1,15 +1,14 @@ package com.intellectualcrafters.plot.object; -import java.util.HashMap; -import java.util.Set; -import java.util.UUID; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.commands.RequiredType; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.util.MainUtil; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; + +import java.util.HashMap; +import java.util.Set; +import java.util.UUID; public class ConsolePlayer implements PlotPlayer { diff --git a/src/main/java/com/intellectualcrafters/plot/object/Plot.java b/src/main/java/com/intellectualcrafters/plot/object/Plot.java index 1512e020b..a43dabb61 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/Plot.java +++ b/src/main/java/com/intellectualcrafters/plot/object/Plot.java @@ -20,18 +20,18 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.object; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.UUID; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.util.ChunkManager; import com.intellectualcrafters.plot.util.MainUtil; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map.Entry; +import java.util.UUID; + /** * The plot class * diff --git a/src/main/java/com/intellectualcrafters/plot/object/PlotAnalysis.java b/src/main/java/com/intellectualcrafters/plot/object/PlotAnalysis.java index b37059615..68078be47 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/PlotAnalysis.java +++ b/src/main/java/com/intellectualcrafters/plot/object/PlotAnalysis.java @@ -1,13 +1,5 @@ package com.intellectualcrafters.plot.object; -import java.io.IOException; -import java.lang.reflect.Array; -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; - import com.intellectualcrafters.configuration.file.YamlConfiguration; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.flag.Flag; @@ -17,6 +9,14 @@ import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.MathMan; import com.intellectualcrafters.plot.util.TaskManager; +import java.io.IOException; +import java.lang.reflect.Array; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + public class PlotAnalysis { public int changes; public int faces; diff --git a/src/main/java/com/intellectualcrafters/plot/object/PlotCluster.java b/src/main/java/com/intellectualcrafters/plot/object/PlotCluster.java index 81a1a7539..bd2c29b9c 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/PlotCluster.java +++ b/src/main/java/com/intellectualcrafters/plot/object/PlotCluster.java @@ -1,10 +1,10 @@ package com.intellectualcrafters.plot.object; +import com.intellectualcrafters.plot.database.DBFunc; + import java.util.HashSet; import java.util.UUID; -import com.intellectualcrafters.plot.database.DBFunc; - public class PlotCluster { public final String world; public PlotSettings settings; diff --git a/src/main/java/com/intellectualcrafters/plot/object/PlotHandler.java b/src/main/java/com/intellectualcrafters/plot/object/PlotHandler.java index 46f7021da..585952bf4 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/PlotHandler.java +++ b/src/main/java/com/intellectualcrafters/plot/object/PlotHandler.java @@ -1,14 +1,14 @@ package com.intellectualcrafters.plot.object; +import com.intellectualcrafters.plot.database.DBFunc; +import com.intellectualcrafters.plot.util.MainUtil; +import com.intellectualcrafters.plot.util.UUIDHandler; + import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.UUID; -import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.UUIDHandler; - public class PlotHandler { public static HashSet getOwners(Plot plot) { if (plot.owner == null) { diff --git a/src/main/java/com/intellectualcrafters/plot/object/PlotManager.java b/src/main/java/com/intellectualcrafters/plot/object/PlotManager.java index 59127e80c..50b0c9007 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/PlotManager.java +++ b/src/main/java/com/intellectualcrafters/plot/object/PlotManager.java @@ -20,13 +20,13 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.object; +import com.intellectualcrafters.plot.commands.Template; + import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; -import com.intellectualcrafters.plot.commands.Template; - public abstract class PlotManager { /* * Plot locations (methods with Abs in them will not need to consider mega diff --git a/src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java b/src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java index 752fe0c63..257559951 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java +++ b/src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java @@ -1,8 +1,8 @@ package com.intellectualcrafters.plot.object; -import java.util.UUID; +import com.plotsquared.general.commands.CommandCaller; -import com.intellectualsites.commands.CommandCaller; +import java.util.UUID; /** * Created 2015-02-20 for PlotSquared @@ -11,31 +11,31 @@ import com.intellectualsites.commands.CommandCaller; */ public interface PlotPlayer extends CommandCaller { - public long getPreviousLogin(); + long getPreviousLogin(); - public Location getLocation(); + Location getLocation(); - public Location getLocationFull(); + Location getLocationFull(); - public UUID getUUID(); + UUID getUUID(); - public boolean hasPermission(final String perm); + boolean hasPermission(final String perm); - public void sendMessage(final String message); + void sendMessage(final String message); - public void teleport(final Location loc); + void teleport(final Location loc); - public boolean isOp(); + boolean isOp(); - public boolean isOnline(); + boolean isOnline(); - public String getName(); + String getName(); - public void setCompassTarget(Location loc); + void setCompassTarget(Location loc); - public void loadData(); + void loadData(); - public void saveData(); + void saveData(); /** * Set player data that will persist restarts @@ -43,21 +43,21 @@ public interface PlotPlayer extends CommandCaller { * - For session only data use meta * @param key */ - public void setAttribute(String key); + void setAttribute(String key); /** * The attribute will be either true or false * @param key */ - public boolean getAttribute(String key); + boolean getAttribute(String key); /** * Remove an attribute from a player * @param key */ - public void removeAttribute(String key); + void removeAttribute(String key); - public void setMeta(String key, Object value); - public Object getMeta(String key); - public void deleteMeta(String key); + void setMeta(String key, Object value); + Object getMeta(String key); + void deleteMeta(String key); } diff --git a/src/main/java/com/intellectualcrafters/plot/object/PlotSettings.java b/src/main/java/com/intellectualcrafters/plot/object/PlotSettings.java index 98c172efe..22e5c2705 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/PlotSettings.java +++ b/src/main/java/com/intellectualcrafters/plot/object/PlotSettings.java @@ -20,17 +20,17 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.object; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; - import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.object.comment.PlotComment; import com.intellectualcrafters.plot.util.BlockManager; import com.intellectualcrafters.plot.util.MainUtil; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; + /** * plot settings * diff --git a/src/main/java/com/intellectualcrafters/plot/object/PlotWorld.java b/src/main/java/com/intellectualcrafters/plot/object/PlotWorld.java index 12c1c65f2..907d2f312 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/PlotWorld.java +++ b/src/main/java/com/intellectualcrafters/plot/object/PlotWorld.java @@ -20,11 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.object; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Set; - import com.intellectualcrafters.configuration.ConfigurationSection; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.Configuration; @@ -35,6 +30,11 @@ import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.util.EconHandler; import com.intellectualcrafters.plot.util.StringMan; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Set; + /** * @author Jesse Boyd */ diff --git a/src/main/java/com/intellectualcrafters/plot/object/Rating.java b/src/main/java/com/intellectualcrafters/plot/object/Rating.java index 7afb9325d..db028ec57 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/Rating.java +++ b/src/main/java/com/intellectualcrafters/plot/object/Rating.java @@ -1,12 +1,12 @@ package com.intellectualcrafters.plot.object; +import com.intellectualcrafters.plot.config.Settings; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map.Entry; -import com.intellectualcrafters.plot.config.Settings; - public class Rating { /** diff --git a/src/main/java/com/intellectualcrafters/plot/object/comment/InboxOwner.java b/src/main/java/com/intellectualcrafters/plot/object/comment/InboxOwner.java index 2a622d5fe..4e89b9cd3 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/comment/InboxOwner.java +++ b/src/main/java/com/intellectualcrafters/plot/object/comment/InboxOwner.java @@ -1,7 +1,5 @@ package com.intellectualcrafters.plot.object.comment; -import java.util.ArrayList; - import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotHandler; @@ -10,6 +8,8 @@ import com.intellectualcrafters.plot.object.RunnableVal; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.TaskManager; +import java.util.ArrayList; + public class InboxOwner extends CommentInbox { @Override diff --git a/src/main/java/com/intellectualcrafters/plot/object/comment/InboxPublic.java b/src/main/java/com/intellectualcrafters/plot/object/comment/InboxPublic.java index 62890fb89..4fa6efe9a 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/comment/InboxPublic.java +++ b/src/main/java/com/intellectualcrafters/plot/object/comment/InboxPublic.java @@ -1,7 +1,5 @@ package com.intellectualcrafters.plot.object.comment; -import java.util.ArrayList; - import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotHandler; @@ -10,6 +8,8 @@ import com.intellectualcrafters.plot.object.RunnableVal; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.TaskManager; +import java.util.ArrayList; + public class InboxPublic extends CommentInbox { @Override diff --git a/src/main/java/com/intellectualcrafters/plot/util/BlockUpdateUtil.java b/src/main/java/com/intellectualcrafters/plot/util/BlockUpdateUtil.java index 09b982afb..b11d43a15 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/BlockUpdateUtil.java +++ b/src/main/java/com/intellectualcrafters/plot/util/BlockUpdateUtil.java @@ -1,9 +1,9 @@ package com.intellectualcrafters.plot.util; -import java.util.Collection; - import com.intellectualcrafters.plot.object.ChunkLoc; +import java.util.Collection; + public abstract class BlockUpdateUtil { public static BlockUpdateUtil setBlockManager = null; diff --git a/src/main/java/com/intellectualcrafters/plot/util/ChunkManager.java b/src/main/java/com/intellectualcrafters/plot/util/ChunkManager.java index fea983fe6..71fa3ad9a 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/ChunkManager.java +++ b/src/main/java/com/intellectualcrafters/plot/util/ChunkManager.java @@ -1,19 +1,12 @@ package com.intellectualcrafters.plot.util; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.SetBlockQueue.ChunkWrapper; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotLoc; -import com.intellectualcrafters.plot.object.RegionWrapper; -import com.intellectualcrafters.plot.object.RunnableVal; -import com.intellectualcrafters.plot.util.SetBlockQueue.ChunkWrapper; - public abstract class ChunkManager { public static ChunkManager manager = null; diff --git a/src/main/java/com/intellectualcrafters/plot/util/ClusterManager.java b/src/main/java/com/intellectualcrafters/plot/util/ClusterManager.java index 86c920037..47ca6b4c0 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/ClusterManager.java +++ b/src/main/java/com/intellectualcrafters/plot/util/ClusterManager.java @@ -1,29 +1,19 @@ package com.intellectualcrafters.plot.util; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Random; - +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.object.*; +import com.plotsquared.bukkit.generator.AugmentedPopulator; +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.World; import org.bukkit.generator.BlockPopulator; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.C; -import com.plotsquared.bukkit.generator.AugmentedPopulator; -import com.intellectualcrafters.plot.object.BlockLoc; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotClusterId; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Random; public class ClusterManager { public static HashMap> clusters; diff --git a/src/main/java/com/intellectualcrafters/plot/util/CmdConfirm.java b/src/main/java/com/intellectualcrafters/plot/util/CmdConfirm.java index b238e91b0..28071ee95 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/CmdConfirm.java +++ b/src/main/java/com/intellectualcrafters/plot/util/CmdConfirm.java @@ -1,11 +1,11 @@ package com.intellectualcrafters.plot.util; -import java.util.HashMap; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.CmdInstance; import com.intellectualcrafters.plot.object.PlotPlayer; +import java.util.HashMap; + public class CmdConfirm { private static HashMap pending = new HashMap<>(); diff --git a/src/main/java/com/intellectualcrafters/plot/util/EventUtil.java b/src/main/java/com/intellectualcrafters/plot/util/EventUtil.java index 99535ff27..f2913233c 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/EventUtil.java +++ b/src/main/java/com/intellectualcrafters/plot/util/EventUtil.java @@ -1,22 +1,16 @@ package com.intellectualcrafters.plot.util; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.UUID; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; +import com.intellectualcrafters.plot.object.*; import com.plotsquared.bukkit.listeners.PlayerBlockEventType; -import com.intellectualcrafters.plot.object.LazyBlock; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; import com.plotsquared.bukkit.util.SetupUtils; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.UUID; + public abstract class EventUtil { public static EventUtil manager = null; diff --git a/src/main/java/com/intellectualcrafters/plot/util/ExpireManager.java b/src/main/java/com/intellectualcrafters/plot/util/ExpireManager.java index c1983f92f..13e2caff4 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/ExpireManager.java +++ b/src/main/java/com/intellectualcrafters/plot/util/ExpireManager.java @@ -1,27 +1,20 @@ package com.intellectualcrafters.plot.util; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; - -import org.bukkit.Bukkit; -import org.bukkit.OfflinePlayer; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.generator.HybridUtils; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotAnalysis; -import com.intellectualcrafters.plot.object.PlotHandler; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.RunnableVal; +import com.intellectualcrafters.plot.object.*; +import org.bukkit.Bukkit; +import org.bukkit.OfflinePlayer; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; public class ExpireManager { public static ConcurrentHashMap> expiredPlots = new ConcurrentHashMap<>(); diff --git a/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java b/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java index 55ea8e0d5..35b29fa3f 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java +++ b/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java @@ -20,33 +20,17 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.util; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map.Entry; -import java.util.UUID; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.object.*; import com.plotsquared.bukkit.listeners.PlotListener; -import com.intellectualcrafters.plot.object.BlockLoc; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.PseudoRandom; -import com.intellectualcrafters.plot.object.RunnableVal; import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.*; +import java.util.Map.Entry; + /** * plot functions * diff --git a/src/main/java/com/intellectualcrafters/plot/util/NbtFactory.java b/src/main/java/com/intellectualcrafters/plot/util/NbtFactory.java index aebf425d6..c351c839a 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/NbtFactory.java +++ b/src/main/java/com/intellectualcrafters/plot/util/NbtFactory.java @@ -1,34 +1,5 @@ package com.intellectualcrafters.plot.util; -import java.io.BufferedInputStream; -import java.io.DataInput; -import java.io.DataInputStream; -import java.io.DataOutput; -import java.io.DataOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.util.AbstractList; -import java.util.AbstractMap; -import java.util.AbstractSet; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentMap; -import java.util.zip.GZIPInputStream; -import java.util.zip.GZIPOutputStream; - -import org.bukkit.Bukkit; -import org.bukkit.Material; -import org.bukkit.Server; -import org.bukkit.inventory.ItemStack; - import com.google.common.base.Splitter; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; @@ -39,6 +10,20 @@ import com.google.common.io.Files; import com.google.common.io.InputSupplier; import com.google.common.io.OutputSupplier; import com.google.common.primitives.Primitives; +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.Server; +import org.bukkit.inventory.ItemStack; + +import java.io.*; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.*; +import java.util.concurrent.ConcurrentMap; +import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; public class NbtFactory { // Convert between NBT id and the equivalent class in java @@ -71,7 +56,7 @@ public class NbtFactory { // Unique NBT id public final int id; - private NbtType(int id, Class type) { + NbtType(int id, Class type) { this.id = id; NBT_CLASS.put(id, type); NBT_ENUM.put(id, this); @@ -285,12 +270,12 @@ public class NbtFactory { * Represents an object that provides a view of a native NMS class. * @author Kristian */ - public static interface Wrapper { + public interface Wrapper { /** * Retrieve the underlying native NBT tag. * @return The underlying NBT. */ - public Object getHandle(); + Object getHandle(); } /** diff --git a/src/main/java/com/intellectualcrafters/plot/util/ReflectionUtils.java b/src/main/java/com/intellectualcrafters/plot/util/ReflectionUtils.java index 83cebe89a..c8e4265b2 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/ReflectionUtils.java +++ b/src/main/java/com/intellectualcrafters/plot/util/ReflectionUtils.java @@ -20,6 +20,9 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// 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.InvocationTargetException; @@ -29,9 +32,6 @@ 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/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java b/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java index 0f8231ff7..1d73ece80 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java +++ b/src/main/java/com/intellectualcrafters/plot/util/SchematicHandler.java @@ -1,56 +1,27 @@ package com.intellectualcrafters.plot.util; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.PrintWriter; -import java.net.HttpURLConnection; -import java.net.URL; -import java.net.URLConnection; -import java.nio.channels.Channels; -import java.nio.channels.ReadableByteChannel; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import java.util.zip.GZIPInputStream; -import java.util.zip.GZIPOutputStream; - import com.google.common.collect.Lists; -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.jnbt.*; import com.intellectualcrafters.json.JSONArray; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.RunnableVal; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.object.schematic.PlotItem; import com.plotsquared.bukkit.object.schematic.StateWrapper; import com.plotsquared.bukkit.util.WorldEditSchematic; import com.plotsquared.bukkit.util.bukkit.BukkitSchematicHandler; import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.io.*; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLConnection; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.util.*; +import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; + public abstract class SchematicHandler { public static SchematicHandler manager = new BukkitSchematicHandler(); @@ -581,7 +552,7 @@ public abstract class SchematicHandler { con.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary); try ( OutputStream output = con.getOutputStream(); - PrintWriter writer = new PrintWriter(new OutputStreamWriter(output, charset), true); + PrintWriter writer = new PrintWriter(new OutputStreamWriter(output, charset), true) ) { writer.append("--" + boundary).append(CRLF); writer.append("Content-Disposition: form-data; name=\"param\"").append(CRLF); diff --git a/src/main/java/com/intellectualcrafters/plot/util/SetBlockQueue.java b/src/main/java/com/intellectualcrafters/plot/util/SetBlockQueue.java index 114c4045d..876ab91d7 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/SetBlockQueue.java +++ b/src/main/java/com/intellectualcrafters/plot/util/SetBlockQueue.java @@ -1,14 +1,14 @@ package com.intellectualcrafters.plot.util; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.object.ChunkLoc; +import com.intellectualcrafters.plot.object.PlotBlock; +import com.plotsquared.bukkit.generator.AugmentedPopulator; + import java.util.HashMap; import java.util.HashSet; import java.util.Map.Entry; -import com.intellectualcrafters.plot.PS; -import com.plotsquared.bukkit.generator.AugmentedPopulator; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.PlotBlock; - public class SetBlockQueue { private volatile static HashMap blocks; diff --git a/src/main/java/com/intellectualcrafters/plot/util/StringMan.java b/src/main/java/com/intellectualcrafters/plot/util/StringMan.java index 98d2b3f78..d5c04159f 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/StringMan.java +++ b/src/main/java/com/intellectualcrafters/plot/util/StringMan.java @@ -1,6 +1,5 @@ package com.intellectualcrafters.plot.util; -import java.util.Arrays; import java.util.Collection; import java.util.Map; import java.util.Map.Entry; diff --git a/src/main/java/com/intellectualcrafters/plot/util/TaskManager.java b/src/main/java/com/intellectualcrafters/plot/util/TaskManager.java index ec83706bd..51e5dbb6e 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/TaskManager.java +++ b/src/main/java/com/intellectualcrafters/plot/util/TaskManager.java @@ -1,11 +1,11 @@ package com.intellectualcrafters.plot.util; +import com.intellectualcrafters.plot.PS; + import java.util.HashMap; import java.util.HashSet; import java.util.concurrent.atomic.AtomicInteger; -import com.intellectualcrafters.plot.PS; - public abstract class TaskManager { public static HashSet TELEPORT_QUEUE = new HashSet<>(); diff --git a/src/main/java/com/intellectualcrafters/plot/util/UUIDHandler.java b/src/main/java/com/intellectualcrafters/plot/util/UUIDHandler.java index 12fa118d7..8880924f7 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/UUIDHandler.java +++ b/src/main/java/com/intellectualcrafters/plot/util/UUIDHandler.java @@ -1,18 +1,14 @@ package com.intellectualcrafters.plot.util; +import com.google.common.collect.BiMap; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.uuid.UUIDWrapper; + import java.util.HashSet; import java.util.Map; import java.util.UUID; -import com.google.common.collect.BiMap; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.object.OfflinePlotPlayer; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.RunnableVal; -import com.intellectualcrafters.plot.object.StringWrapper; -import com.intellectualcrafters.plot.uuid.UUIDWrapper; - public class UUIDHandler { public static UUIDHandlerImplementation implementation; diff --git a/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpMenu.java b/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpMenu.java index fe9e25262..a664121cd 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpMenu.java +++ b/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpMenu.java @@ -3,8 +3,7 @@ package com.intellectualcrafters.plot.util.helpmenu; import com.intellectualcrafters.plot.commands.CommandCategory; import com.intellectualcrafters.plot.commands.MainCommand; import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualsites.commands.Command; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import com.plotsquared.general.commands.Command; import java.util.List; diff --git a/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpObject.java b/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpObject.java index 15229feac..22a704270 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpObject.java +++ b/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpObject.java @@ -2,8 +2,8 @@ package com.intellectualcrafters.plot.util.helpmenu; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.util.StringMan; -import com.intellectualsites.commands.Argument; -import com.intellectualsites.commands.Command; +import com.plotsquared.general.commands.Argument; +import com.plotsquared.general.commands.Command; public class HelpObject { diff --git a/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpPage.java b/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpPage.java index eec456da7..ac2c21578 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpPage.java +++ b/src/main/java/com/intellectualcrafters/plot/util/helpmenu/HelpPage.java @@ -6,9 +6,7 @@ import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import java.util.ArrayList; -import java.util.HashSet; import java.util.List; -import java.util.Set; public class HelpPage { diff --git a/src/main/java/com/intellectualcrafters/plot/uuid/DefaultUUIDWrapper.java b/src/main/java/com/intellectualcrafters/plot/uuid/DefaultUUIDWrapper.java index 392f033d8..1c699c5fc 100644 --- a/src/main/java/com/intellectualcrafters/plot/uuid/DefaultUUIDWrapper.java +++ b/src/main/java/com/intellectualcrafters/plot/uuid/DefaultUUIDWrapper.java @@ -1,14 +1,13 @@ package com.intellectualcrafters.plot.uuid; -import java.util.UUID; - +import com.intellectualcrafters.plot.object.OfflinePlotPlayer; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.bukkit.object.BukkitOfflinePlayer; +import com.plotsquared.bukkit.object.BukkitPlayer; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; -import com.plotsquared.bukkit.object.BukkitOfflinePlayer; -import com.plotsquared.bukkit.object.BukkitPlayer; -import com.intellectualcrafters.plot.object.OfflinePlotPlayer; -import com.intellectualcrafters.plot.object.PlotPlayer; +import java.util.UUID; public class DefaultUUIDWrapper extends UUIDWrapper { @Override diff --git a/src/main/java/com/intellectualcrafters/plot/uuid/LowerOfflineUUIDWrapper.java b/src/main/java/com/intellectualcrafters/plot/uuid/LowerOfflineUUIDWrapper.java index b1d6f288c..d66d573d7 100644 --- a/src/main/java/com/intellectualcrafters/plot/uuid/LowerOfflineUUIDWrapper.java +++ b/src/main/java/com/intellectualcrafters/plot/uuid/LowerOfflineUUIDWrapper.java @@ -1,22 +1,21 @@ package com.intellectualcrafters.plot.uuid; -import java.lang.reflect.Method; -import java.util.Collection; -import java.util.UUID; - +import com.google.common.base.Charsets; +import com.google.common.collect.BiMap; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.object.OfflinePlotPlayer; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.object.StringWrapper; +import com.intellectualcrafters.plot.util.UUIDHandler; +import com.plotsquared.bukkit.object.BukkitOfflinePlayer; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.Server; import org.bukkit.entity.Player; -import com.google.common.base.Charsets; -import com.google.common.collect.BiMap; -import com.intellectualcrafters.plot.PS; -import com.plotsquared.bukkit.object.BukkitOfflinePlayer; -import com.intellectualcrafters.plot.object.OfflinePlotPlayer; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.StringWrapper; -import com.intellectualcrafters.plot.util.UUIDHandler; +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.UUID; public class LowerOfflineUUIDWrapper extends OfflineUUIDWrapper { private Method getOnline = null; diff --git a/src/main/java/com/intellectualcrafters/plot/uuid/OfflineUUIDWrapper.java b/src/main/java/com/intellectualcrafters/plot/uuid/OfflineUUIDWrapper.java index 08c8c51a0..f8b6e92c2 100644 --- a/src/main/java/com/intellectualcrafters/plot/uuid/OfflineUUIDWrapper.java +++ b/src/main/java/com/intellectualcrafters/plot/uuid/OfflineUUIDWrapper.java @@ -1,22 +1,21 @@ package com.intellectualcrafters.plot.uuid; -import java.lang.reflect.Method; -import java.util.Collection; -import java.util.UUID; - +import com.google.common.base.Charsets; +import com.google.common.collect.BiMap; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.object.OfflinePlotPlayer; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.object.StringWrapper; +import com.intellectualcrafters.plot.util.UUIDHandler; +import com.plotsquared.bukkit.object.BukkitOfflinePlayer; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.Server; import org.bukkit.entity.Player; -import com.google.common.base.Charsets; -import com.google.common.collect.BiMap; -import com.intellectualcrafters.plot.PS; -import com.plotsquared.bukkit.object.BukkitOfflinePlayer; -import com.intellectualcrafters.plot.object.OfflinePlotPlayer; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.StringWrapper; -import com.intellectualcrafters.plot.util.UUIDHandler; +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.UUID; public class OfflineUUIDWrapper extends UUIDWrapper { private Method getOnline = null; diff --git a/src/main/java/com/intellectualcrafters/plot/uuid/UUIDWrapper.java b/src/main/java/com/intellectualcrafters/plot/uuid/UUIDWrapper.java index 1c6381c1c..a5a30d7e0 100644 --- a/src/main/java/com/intellectualcrafters/plot/uuid/UUIDWrapper.java +++ b/src/main/java/com/intellectualcrafters/plot/uuid/UUIDWrapper.java @@ -1,10 +1,10 @@ package com.intellectualcrafters.plot.uuid; -import java.util.UUID; - import com.intellectualcrafters.plot.object.OfflinePlotPlayer; import com.intellectualcrafters.plot.object.PlotPlayer; +import java.util.UUID; + public abstract class UUIDWrapper { public abstract UUID getUUID(PlotPlayer player); diff --git a/src/main/java/com/plotsquared/bukkit/BukkitMain.java b/src/main/java/com/plotsquared/bukkit/BukkitMain.java index fde229d3a..72256b9ee 100644 --- a/src/main/java/com/plotsquared/bukkit/BukkitMain.java +++ b/src/main/java/com/plotsquared/bukkit/BukkitMain.java @@ -2,37 +2,37 @@ package com.plotsquared.bukkit; import com.intellectualcrafters.plot.IPlotMain; import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.commands.*; +import com.intellectualcrafters.plot.commands.MainCommand; +import com.intellectualcrafters.plot.commands.WE_Anywhere; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; -import com.plotsquared.bukkit.commands.BukkitCommand; -import com.plotsquared.bukkit.database.plotme.ClassicPlotMeConnector; -import com.plotsquared.bukkit.database.plotme.LikePlotMeConverter; -import com.plotsquared.bukkit.database.plotme.PlotMeConnector_017; import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.generator.BukkitHybridUtils; -import com.plotsquared.bukkit.generator.BukkitGeneratorWrapper; -import com.plotsquared.bukkit.generator.HybridGen; import com.intellectualcrafters.plot.generator.HybridUtils; -import com.plotsquared.bukkit.listeners.*; -import com.plotsquared.bukkit.listeners.worldedit.WEListener; -import com.plotsquared.bukkit.listeners.worldedit.WESubscriber; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotWorld; -import com.plotsquared.bukkit.titles.AbstractTitle; -import com.plotsquared.bukkit.titles.DefaultTitle; import com.intellectualcrafters.plot.util.*; import com.intellectualcrafters.plot.uuid.DefaultUUIDWrapper; import com.intellectualcrafters.plot.uuid.LowerOfflineUUIDWrapper; import com.intellectualcrafters.plot.uuid.OfflineUUIDWrapper; import com.intellectualcrafters.plot.uuid.UUIDWrapper; +import com.plotsquared.bukkit.commands.BukkitCommand; +import com.plotsquared.bukkit.database.plotme.ClassicPlotMeConnector; +import com.plotsquared.bukkit.database.plotme.LikePlotMeConverter; +import com.plotsquared.bukkit.database.plotme.PlotMeConnector_017; +import com.plotsquared.bukkit.generator.BukkitGeneratorWrapper; +import com.plotsquared.bukkit.generator.HybridGen; +import com.plotsquared.bukkit.listeners.*; +import com.plotsquared.bukkit.listeners.worldedit.WEListener; +import com.plotsquared.bukkit.listeners.worldedit.WESubscriber; +import com.plotsquared.bukkit.titles.AbstractTitle; +import com.plotsquared.bukkit.titles.DefaultTitle; import com.plotsquared.bukkit.util.SetupUtils; import com.plotsquared.bukkit.util.bukkit.*; import com.plotsquared.bukkit.util.bukkit.uuid.FileUUIDHandler; import com.plotsquared.bukkit.util.bukkit.uuid.SQLUUIDHandler; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.bukkit.WorldEditPlugin; - import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Location; @@ -124,7 +124,7 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain { Bukkit.getServer().getConsoleSender().sendMessage(message); return; } - catch (Throwable e) {}; + catch (Throwable e) {} } System.out.println(ConsoleColors.fromString(message)); } diff --git a/src/main/java/com/plotsquared/bukkit/commands/BukkitCommand.java b/src/main/java/com/plotsquared/bukkit/commands/BukkitCommand.java index d0a7d0e6f..50261dd42 100644 --- a/src/main/java/com/plotsquared/bukkit/commands/BukkitCommand.java +++ b/src/main/java/com/plotsquared/bukkit/commands/BukkitCommand.java @@ -1,24 +1,17 @@ package com.plotsquared.bukkit.commands; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - import com.intellectualcrafters.plot.commands.MainCommand; -import com.intellectualsites.commands.Command; - +import com.intellectualcrafters.plot.object.ConsolePlayer; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.StringComparison; +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import com.plotsquared.general.commands.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.object.ConsolePlayer; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.StringComparison; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.*; /** * Created 2015-02-20 for PlotSquared diff --git a/src/main/java/com/plotsquared/bukkit/database/plotme/APlotMeConnector.java b/src/main/java/com/plotsquared/bukkit/database/plotme/APlotMeConnector.java index dce18505e..409d2071d 100644 --- a/src/main/java/com/plotsquared/bukkit/database/plotme/APlotMeConnector.java +++ b/src/main/java/com/plotsquared/bukkit/database/plotme/APlotMeConnector.java @@ -1,18 +1,17 @@ package com.plotsquared.bukkit.database.plotme; -import java.sql.Connection; -import java.sql.SQLException; -import java.util.Arrays; -import java.util.HashMap; - -import org.bukkit.Bukkit; -import org.bukkit.World; - import com.intellectualcrafters.configuration.file.FileConfiguration; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; +import org.bukkit.Bukkit; +import org.bukkit.World; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.Arrays; +import java.util.HashMap; public abstract class APlotMeConnector { public abstract Connection getPlotMeConnection(String plugin, FileConfiguration plotConfig, String dataFolder); diff --git a/src/main/java/com/plotsquared/bukkit/database/plotme/ClassicPlotMeConnector.java b/src/main/java/com/plotsquared/bukkit/database/plotme/ClassicPlotMeConnector.java index 333fbbc89..c1a64e5a5 100644 --- a/src/main/java/com/plotsquared/bukkit/database/plotme/ClassicPlotMeConnector.java +++ b/src/main/java/com/plotsquared/bukkit/database/plotme/ClassicPlotMeConnector.java @@ -1,15 +1,5 @@ package com.plotsquared.bukkit.database.plotme; -import java.io.File; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.Map.Entry; -import java.util.UUID; - import com.intellectualcrafters.configuration.file.FileConfiguration; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.Settings; @@ -22,6 +12,12 @@ import com.intellectualcrafters.plot.object.StringWrapper; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.UUIDHandler; +import java.io.File; +import java.sql.*; +import java.util.HashMap; +import java.util.Map.Entry; +import java.util.UUID; + public class ClassicPlotMeConnector extends APlotMeConnector { private String plugin; diff --git a/src/main/java/com/plotsquared/bukkit/database/plotme/LikePlotMeConverter.java b/src/main/java/com/plotsquared/bukkit/database/plotme/LikePlotMeConverter.java index 21e16c090..25544571a 100644 --- a/src/main/java/com/plotsquared/bukkit/database/plotme/LikePlotMeConverter.java +++ b/src/main/java/com/plotsquared/bukkit/database/plotme/LikePlotMeConverter.java @@ -20,6 +20,19 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.database.plotme; +import com.intellectualcrafters.configuration.file.FileConfiguration; +import com.intellectualcrafters.configuration.file.YamlConfiguration; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.Settings; +import com.intellectualcrafters.plot.database.DBFunc; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.util.TaskManager; +import com.plotsquared.bukkit.generator.HybridGen; +import org.bukkit.Bukkit; +import org.bukkit.World; +import org.bukkit.WorldCreator; + import java.io.File; import java.io.IOException; import java.nio.charset.Charset; @@ -34,20 +47,6 @@ import java.util.HashMap; import java.util.Map.Entry; import java.util.Set; -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.WorldCreator; - -import com.intellectualcrafters.configuration.file.FileConfiguration; -import com.intellectualcrafters.configuration.file.YamlConfiguration; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.database.DBFunc; -import com.plotsquared.bukkit.generator.HybridGen; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.util.TaskManager; - /** * Created 2014-08-17 for PlotSquared * diff --git a/src/main/java/com/plotsquared/bukkit/database/plotme/PlotMeConnector_017.java b/src/main/java/com/plotsquared/bukkit/database/plotme/PlotMeConnector_017.java index 3d0978664..8352113ae 100644 --- a/src/main/java/com/plotsquared/bukkit/database/plotme/PlotMeConnector_017.java +++ b/src/main/java/com/plotsquared/bukkit/database/plotme/PlotMeConnector_017.java @@ -1,15 +1,5 @@ package com.plotsquared.bukkit.database.plotme; -import java.io.File; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.Map.Entry; -import java.util.UUID; - import com.intellectualcrafters.configuration.file.FileConfiguration; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.Settings; @@ -22,6 +12,12 @@ import com.intellectualcrafters.plot.object.StringWrapper; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.UUIDHandler; +import java.io.File; +import java.sql.*; +import java.util.HashMap; +import java.util.Map.Entry; +import java.util.UUID; + public class PlotMeConnector_017 extends APlotMeConnector { private String plugin; diff --git a/src/main/java/com/plotsquared/bukkit/events/ClusterFlagRemoveEvent.java b/src/main/java/com/plotsquared/bukkit/events/ClusterFlagRemoveEvent.java index ee71aaf0b..4cd04a8b7 100644 --- a/src/main/java/com/plotsquared/bukkit/events/ClusterFlagRemoveEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/ClusterFlagRemoveEvent.java @@ -20,13 +20,12 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.events; +import com.intellectualcrafters.plot.flag.Flag; +import com.intellectualcrafters.plot.object.PlotCluster; 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.PlotCluster; - /** * Called when a flag is removed from a plot * diff --git a/src/main/java/com/plotsquared/bukkit/events/PlayerClaimPlotEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlayerClaimPlotEvent.java index b9616c300..bb6d491ab 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlayerClaimPlotEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlayerClaimPlotEvent.java @@ -20,13 +20,12 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.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/src/main/java/com/plotsquared/bukkit/events/PlayerEnterPlotEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlayerEnterPlotEvent.java index ba203cebe..2331e5953 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlayerEnterPlotEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlayerEnterPlotEvent.java @@ -20,12 +20,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.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/src/main/java/com/plotsquared/bukkit/events/PlayerLeavePlotEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlayerLeavePlotEvent.java index c493388ea..ab26b59a3 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlayerLeavePlotEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlayerLeavePlotEvent.java @@ -20,12 +20,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.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/src/main/java/com/plotsquared/bukkit/events/PlayerPlotDeniedEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlayerPlotDeniedEvent.java index 2fd73d28d..e0c298a9f 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlayerPlotDeniedEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlayerPlotDeniedEvent.java @@ -20,12 +20,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.events; -import java.util.UUID; - +import com.intellectualcrafters.plot.object.Plot; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; -import com.intellectualcrafters.plot.object.Plot; +import java.util.UUID; /** * @author Citymonstret diff --git a/src/main/java/com/plotsquared/bukkit/events/PlayerPlotHelperEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlayerPlotHelperEvent.java index c44156f51..9df0f2e4b 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlayerPlotHelperEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlayerPlotHelperEvent.java @@ -20,12 +20,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.events; -import java.util.UUID; - +import com.intellectualcrafters.plot.object.Plot; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; -import com.intellectualcrafters.plot.object.Plot; +import java.util.UUID; /** * @author Empire92 diff --git a/src/main/java/com/plotsquared/bukkit/events/PlayerPlotTrustedEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlayerPlotTrustedEvent.java index 189cd575c..c646d5811 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlayerPlotTrustedEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlayerPlotTrustedEvent.java @@ -20,12 +20,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.events; -import java.util.UUID; - +import com.intellectualcrafters.plot.object.Plot; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; -import com.intellectualcrafters.plot.object.Plot; +import java.util.UUID; /** * @author Citymonstret diff --git a/src/main/java/com/plotsquared/bukkit/events/PlayerTeleportToPlotEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlayerTeleportToPlotEvent.java index d8af3de51..7676f482b 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlayerTeleportToPlotEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlayerTeleportToPlotEvent.java @@ -20,14 +20,13 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.events; +import com.intellectualcrafters.plot.object.Location; +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.Location; -import com.intellectualcrafters.plot.object.Plot; - /** * Called when a player teleports to a plot * diff --git a/src/main/java/com/plotsquared/bukkit/events/PlotClearEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlotClearEvent.java index 4f66073fa..d5be3eb22 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlotClearEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlotClearEvent.java @@ -20,12 +20,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.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/src/main/java/com/plotsquared/bukkit/events/PlotDeleteEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlotDeleteEvent.java index 5f5b0aa38..71d9bd330 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlotDeleteEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlotDeleteEvent.java @@ -20,11 +20,10 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.events; +import com.intellectualcrafters.plot.object.PlotId; 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/src/main/java/com/plotsquared/bukkit/events/PlotEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlotEvent.java index 1e45b9fbf..5fae6f1a6 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlotEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlotEvent.java @@ -1,8 +1,7 @@ package com.plotsquared.bukkit.events; -import org.bukkit.event.Event; - import com.intellectualcrafters.plot.object.Plot; +import org.bukkit.event.Event; public abstract class PlotEvent extends Event { diff --git a/src/main/java/com/plotsquared/bukkit/events/PlotFlagAddEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlotFlagAddEvent.java index eefd61555..6ecb97052 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlotFlagAddEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlotFlagAddEvent.java @@ -20,11 +20,10 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.events; -import org.bukkit.event.Cancellable; -import org.bukkit.event.HandlerList; - import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.object.Plot; +import org.bukkit.event.Cancellable; +import org.bukkit.event.HandlerList; /** * Called when a Flag is added to a plot diff --git a/src/main/java/com/plotsquared/bukkit/events/PlotFlagRemoveEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlotFlagRemoveEvent.java index cce59834f..5ca46babb 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlotFlagRemoveEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlotFlagRemoveEvent.java @@ -20,11 +20,10 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.events; -import org.bukkit.event.Cancellable; -import org.bukkit.event.HandlerList; - import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.object.Plot; +import org.bukkit.event.Cancellable; +import org.bukkit.event.HandlerList; /** * Called when a flag is removed from a plot diff --git a/src/main/java/com/plotsquared/bukkit/events/PlotMergeEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlotMergeEvent.java index 99ca03ddb..4e14a1a68 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlotMergeEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlotMergeEvent.java @@ -20,15 +20,14 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.events; -import java.util.ArrayList; - +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotId; import org.bukkit.World; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; +import java.util.ArrayList; /** * @author Empire92 diff --git a/src/main/java/com/plotsquared/bukkit/events/PlotRateEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlotRateEvent.java index bf87381ef..65c20e15a 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlotRateEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlotRateEvent.java @@ -1,9 +1,8 @@ package com.plotsquared.bukkit.events; -import org.bukkit.event.HandlerList; - import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; +import org.bukkit.event.HandlerList; /** * Created 2015-07-13 for PlotSquaredGit diff --git a/src/main/java/com/plotsquared/bukkit/events/PlotUnlinkEvent.java b/src/main/java/com/plotsquared/bukkit/events/PlotUnlinkEvent.java index a8d4e8854..b6c7166a0 100644 --- a/src/main/java/com/plotsquared/bukkit/events/PlotUnlinkEvent.java +++ b/src/main/java/com/plotsquared/bukkit/events/PlotUnlinkEvent.java @@ -20,14 +20,13 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.events; -import java.util.ArrayList; - +import com.intellectualcrafters.plot.object.PlotId; import org.bukkit.World; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -import com.intellectualcrafters.plot.object.PlotId; +import java.util.ArrayList; /** * @author Empire92 diff --git a/src/main/java/com/plotsquared/bukkit/generator/AugmentedPopulator.java b/src/main/java/com/plotsquared/bukkit/generator/AugmentedPopulator.java index e9d2f0801..1b5d7f975 100644 --- a/src/main/java/com/plotsquared/bukkit/generator/AugmentedPopulator.java +++ b/src/main/java/com/plotsquared/bukkit/generator/AugmentedPopulator.java @@ -1,29 +1,22 @@ package com.plotsquared.bukkit.generator; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map.Entry; -import java.util.Random; - +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.ChunkManager; +import com.intellectualcrafters.plot.util.TaskManager; +import com.plotsquared.bukkit.object.BlockWrapper; +import com.plotsquared.bukkit.util.bukkit.BukkitChunkManager; +import com.plotsquared.bukkit.util.bukkit.BukkitSetBlockManager; import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.World; import org.bukkit.block.Biome; import org.bukkit.generator.BlockPopulator; -import com.intellectualcrafters.plot.PS; -import com.plotsquared.bukkit.object.BlockWrapper; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotLoc; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.RegionWrapper; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.intellectualcrafters.plot.util.TaskManager; -import com.plotsquared.bukkit.util.bukkit.BukkitChunkManager; -import com.plotsquared.bukkit.util.bukkit.BukkitSetBlockManager; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map.Entry; +import java.util.Random; public class AugmentedPopulator extends BlockPopulator { public static short[][] x_loc; diff --git a/src/main/java/com/plotsquared/bukkit/generator/BukkitGeneratorWrapper.java b/src/main/java/com/plotsquared/bukkit/generator/BukkitGeneratorWrapper.java index 6d2330a47..8fc8aa35c 100644 --- a/src/main/java/com/plotsquared/bukkit/generator/BukkitGeneratorWrapper.java +++ b/src/main/java/com/plotsquared/bukkit/generator/BukkitGeneratorWrapper.java @@ -1,12 +1,11 @@ package com.plotsquared.bukkit.generator; -import org.bukkit.generator.ChunkGenerator; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.generator.PlotGenerator; import com.intellectualcrafters.plot.object.PlotCluster; import com.intellectualcrafters.plot.object.PlotManager; import com.intellectualcrafters.plot.object.PlotWorld; +import org.bukkit.generator.ChunkGenerator; public class BukkitGeneratorWrapper extends PlotGenerator { diff --git a/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java b/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java index 82a09b596..45552038e 100644 --- a/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java +++ b/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java @@ -20,23 +20,21 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.generator; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map.Entry; -import java.util.Random; - +import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.object.*; - +import com.intellectualcrafters.plot.util.ChunkManager; +import com.plotsquared.bukkit.listeners.WorldEvents; +import com.plotsquared.bukkit.object.PlotPopulator; import org.bukkit.World; import org.bukkit.block.Biome; import org.bukkit.generator.BlockPopulator; import org.bukkit.generator.ChunkGenerator; -import com.intellectualcrafters.plot.PS; -import com.plotsquared.bukkit.listeners.WorldEvents; -import com.plotsquared.bukkit.object.PlotPopulator; -import com.intellectualcrafters.plot.util.ChunkManager; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; +import java.util.Random; public abstract class BukkitPlotGenerator extends ChunkGenerator { diff --git a/src/main/java/com/plotsquared/bukkit/generator/HybridGen.java b/src/main/java/com/plotsquared/bukkit/generator/HybridGen.java index 4b74ede90..5165ed8d8 100644 --- a/src/main/java/com/plotsquared/bukkit/generator/HybridGen.java +++ b/src/main/java/com/plotsquared/bukkit/generator/HybridGen.java @@ -20,24 +20,19 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.generator; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map.Entry; - import com.intellectualcrafters.plot.generator.HybridPlotManager; import com.intellectualcrafters.plot.generator.HybridPlotWorld; import com.intellectualcrafters.plot.generator.HybridPop; +import com.intellectualcrafters.plot.object.*; +import com.plotsquared.bukkit.object.PlotPopulator; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.block.Biome; -import com.intellectualcrafters.plot.object.PlotLoc; -import com.intellectualcrafters.plot.object.PlotManager; -import com.plotsquared.bukkit.object.PlotPopulator; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.PseudoRandom; -import com.intellectualcrafters.plot.object.RegionWrapper; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; /** * The default generator is very messy, as we have decided to try externalize all calculations from within the loop. - diff --git a/src/main/java/com/plotsquared/bukkit/listeners/ChatListener.java b/src/main/java/com/plotsquared/bukkit/listeners/ChatListener.java index e6b8dcaba..b1b51eb79 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/ChatListener.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/ChatListener.java @@ -1,7 +1,10 @@ package com.plotsquared.bukkit.listeners; -import java.util.Set; - +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.MainUtil; +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.entity.Player; @@ -10,15 +13,7 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.AsyncPlayerChatEvent; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.util.MainUtil; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.Set; /** * Created 2015-07-13 for PlotSquaredGit diff --git a/src/main/java/com/plotsquared/bukkit/listeners/ChunkListener.java b/src/main/java/com/plotsquared/bukkit/listeners/ChunkListener.java index 958f22a4a..2601205e1 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/ChunkListener.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/ChunkListener.java @@ -1,5 +1,8 @@ package com.plotsquared.bukkit.listeners; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.Settings; +import com.intellectualcrafters.plot.util.TaskManager; import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.Material; @@ -17,10 +20,6 @@ import org.bukkit.event.entity.ItemSpawnEvent; import org.bukkit.event.world.ChunkLoadEvent; import org.bukkit.event.world.ChunkUnloadEvent; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.util.TaskManager; - public class ChunkListener implements Listener { private Chunk lastChunk = null; diff --git a/src/main/java/com/plotsquared/bukkit/listeners/ForceFieldListener.java b/src/main/java/com/plotsquared/bukkit/listeners/ForceFieldListener.java index 0ec5fc635..82a22de06 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/ForceFieldListener.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/ForceFieldListener.java @@ -20,24 +20,23 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.listeners; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - +import com.intellectualcrafters.plot.flag.FlagManager; +import com.intellectualcrafters.plot.object.Location; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.UUIDHandler; +import com.plotsquared.bukkit.events.PlayerEnterPlotEvent; +import com.plotsquared.bukkit.util.bukkit.BukkitPlayerFunctions; +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.util.Vector; -import com.plotsquared.bukkit.events.PlayerEnterPlotEvent; -import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.plotsquared.bukkit.util.bukkit.BukkitPlayerFunctions; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; /** * @author Citymonstret diff --git a/src/main/java/com/plotsquared/bukkit/listeners/InventoryListener.java b/src/main/java/com/plotsquared/bukkit/listeners/InventoryListener.java index 415131598..038319925 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/InventoryListener.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/InventoryListener.java @@ -1,5 +1,8 @@ package com.plotsquared.bukkit.listeners; +import com.intellectualcrafters.plot.util.MainUtil; +import com.plotsquared.bukkit.object.InfoInventory; +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.EventHandler; @@ -8,10 +11,6 @@ import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryInteractEvent; import org.bukkit.inventory.Inventory; -import com.plotsquared.bukkit.object.InfoInventory; -import com.intellectualcrafters.plot.util.MainUtil; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; - /** * Created 2014-11-18 for PlotSquared * @author Citymonstret diff --git a/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java b/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java index fa4573f6a..2c875711f 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -1,81 +1,36 @@ package com.plotsquared.bukkit.listeners; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.UUID; -import java.util.regex.Pattern; - -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.Chunk; -import org.bukkit.Material; -import org.bukkit.World; +import com.intellectualcrafters.plot.PS; +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.Location; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.bukkit.listeners.worldedit.WEManager; +import com.plotsquared.bukkit.object.BukkitLazyBlock; +import com.plotsquared.bukkit.object.BukkitPlayer; +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import org.bukkit.*; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; import org.bukkit.block.BlockState; import org.bukkit.command.PluginCommand; -import org.bukkit.entity.Animals; -import org.bukkit.entity.ArmorStand; -import org.bukkit.entity.Arrow; -import org.bukkit.entity.Creature; -import org.bukkit.entity.EnderDragon; -import org.bukkit.entity.Entity; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.FallingBlock; -import org.bukkit.entity.Hanging; -import org.bukkit.entity.HumanEntity; -import org.bukkit.entity.Monster; -import org.bukkit.entity.Player; -import org.bukkit.entity.Projectile; -import org.bukkit.entity.Tameable; -import org.bukkit.entity.Vehicle; +import org.bukkit.entity.*; import org.bukkit.entity.minecart.RideableMinecart; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.block.Action; -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.BlockPhysicsEvent; -import org.bukkit.event.block.BlockPistonExtendEvent; -import org.bukkit.event.block.BlockPistonRetractEvent; -import org.bukkit.event.block.BlockPlaceEvent; -import org.bukkit.event.block.BlockRedstoneEvent; -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; -import org.bukkit.event.entity.EntityExplodeEvent; -import org.bukkit.event.entity.ProjectileHitEvent; +import org.bukkit.event.block.*; +import org.bukkit.event.entity.*; import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.hanging.HangingPlaceEvent; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryCloseEvent; -import org.bukkit.event.player.AsyncPlayerChatEvent; -import org.bukkit.event.player.PlayerBucketEmptyEvent; -import org.bukkit.event.player.PlayerBucketFillEvent; -import org.bukkit.event.player.PlayerChangedWorldEvent; -import org.bukkit.event.player.PlayerCommandPreprocessEvent; -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.PlayerLoginEvent; +import org.bukkit.event.player.*; import org.bukkit.event.player.PlayerLoginEvent.Result; -import org.bukkit.event.player.PlayerMoveEvent; -import org.bukkit.event.player.PlayerQuitEvent; -import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.event.vehicle.VehicleCreateEvent; import org.bukkit.event.vehicle.VehicleDestroyEvent; import org.bukkit.event.world.ChunkLoadEvent; @@ -86,35 +41,8 @@ import org.bukkit.projectiles.BlockProjectileSource; import org.bukkit.projectiles.ProjectileSource; import org.bukkit.util.Vector; -import com.intellectualcrafters.plot.PS; -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.plotsquared.bukkit.listeners.worldedit.WEManager; -import com.plotsquared.bukkit.object.BukkitLazyBlock; -import com.plotsquared.bukkit.object.BukkitPlayer; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotHandler; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotInventory; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.StringWrapper; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.intellectualcrafters.plot.util.EventUtil; -import com.intellectualcrafters.plot.util.ExpireManager; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.RegExUtil; -import com.intellectualcrafters.plot.util.StringMan; -import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.*; +import java.util.regex.Pattern; /** * Player Events involving plots diff --git a/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents_1_8.java b/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents_1_8.java index adc9e5dd3..03e5b002a 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents_1_8.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents_1_8.java @@ -1,9 +1,13 @@ package com.plotsquared.bukkit.listeners; -import java.util.HashSet; -import java.util.List; -import java.util.UUID; - +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.object.Location; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; +import com.intellectualcrafters.plot.util.Permissions; +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; import org.bukkit.block.Block; import org.bukkit.block.BlockState; import org.bukkit.entity.ArmorStand; @@ -20,14 +24,9 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.PlayerInventory; import org.bukkit.inventory.meta.ItemMeta; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.HashSet; +import java.util.List; +import java.util.UUID; public class PlayerEvents_1_8 extends PlotListener implements Listener { diff --git a/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents_1_8_3.java b/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents_1_8_3.java index 486f54af1..9e77afaee 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents_1_8_3.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents_1_8_3.java @@ -1,19 +1,18 @@ package com.plotsquared.bukkit.listeners; -import java.util.Iterator; - -import org.bukkit.block.Block; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; -import org.bukkit.event.block.BlockExplodeEvent; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.util.MainUtil; import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import org.bukkit.block.Block; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockExplodeEvent; + +import java.util.Iterator; public class PlayerEvents_1_8_3 implements Listener { @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) diff --git a/src/main/java/com/plotsquared/bukkit/listeners/PlotListener.java b/src/main/java/com/plotsquared/bukkit/listeners/PlotListener.java index e7d2cd2c9..1723b0a57 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/PlotListener.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/PlotListener.java @@ -20,37 +20,27 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.listeners; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.config.Settings; +import com.intellectualcrafters.plot.flag.Flag; +import com.intellectualcrafters.plot.flag.FlagManager; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.bukkit.events.PlayerEnterPlotEvent; +import com.plotsquared.bukkit.events.PlayerLeavePlotEvent; +import com.plotsquared.bukkit.object.BukkitPlayer; +import com.plotsquared.bukkit.object.comment.CommentManager; +import com.plotsquared.bukkit.titles.AbstractTitle; +import org.bukkit.*; +import org.bukkit.entity.Player; + import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.UUID; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.Effect; -import org.bukkit.GameMode; -import org.bukkit.Material; -import org.bukkit.WeatherType; -import org.bukkit.entity.Player; - -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.config.Settings; -import com.plotsquared.bukkit.events.PlayerEnterPlotEvent; -import com.plotsquared.bukkit.events.PlayerLeavePlotEvent; -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.flag.FlagManager; -import com.plotsquared.bukkit.object.BukkitPlayer; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.plotsquared.bukkit.object.comment.CommentManager; -import com.plotsquared.bukkit.titles.AbstractTitle; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.StringMan; -import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualcrafters.plot.util.UUIDHandler; - /** * @author Citymonstret * @author Empire92 diff --git a/src/main/java/com/plotsquared/bukkit/listeners/PlotPlusListener.java b/src/main/java/com/plotsquared/bukkit/listeners/PlotPlusListener.java index 8b24cbac4..73c35c8c6 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/PlotPlusListener.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/PlotPlusListener.java @@ -20,13 +20,18 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.listeners; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map.Entry; -import java.util.UUID; - +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.flag.Flag; +import com.intellectualcrafters.plot.flag.FlagManager; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotHandler; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; +import com.intellectualcrafters.plot.util.Permissions; +import com.intellectualcrafters.plot.util.UUIDHandler; +import com.plotsquared.bukkit.events.PlayerEnterPlotEvent; +import com.plotsquared.bukkit.events.PlayerLeavePlotEvent; +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.GameMode; @@ -43,18 +48,8 @@ import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.plugin.java.JavaPlugin; -import com.intellectualcrafters.plot.config.C; -import com.plotsquared.bukkit.events.PlayerEnterPlotEvent; -import com.plotsquared.bukkit.events.PlayerLeavePlotEvent; -import com.intellectualcrafters.plot.flag.Flag; -import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotHandler; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.Permissions; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.*; +import java.util.Map.Entry; /** * Created 2014-10-30 for PlotSquared diff --git a/src/main/java/com/plotsquared/bukkit/listeners/TNTListener.java b/src/main/java/com/plotsquared/bukkit/listeners/TNTListener.java index f7940a7f5..477f64e8d 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/TNTListener.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/TNTListener.java @@ -1,7 +1,11 @@ package com.plotsquared.bukkit.listeners; -import java.util.List; - +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.flag.FlagManager; +import com.intellectualcrafters.plot.object.Location; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.util.MainUtil; +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; import org.bukkit.World; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; @@ -12,12 +16,7 @@ import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.event.entity.ExplosionPrimeEvent; import org.bukkit.util.Vector; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.flag.FlagManager; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.util.MainUtil; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.List; public class TNTListener implements Listener { private double lastRadius; diff --git a/src/main/java/com/plotsquared/bukkit/listeners/WorldEvents.java b/src/main/java/com/plotsquared/bukkit/listeners/WorldEvents.java index 77d5fc3f5..fdd2fbbc3 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/WorldEvents.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/WorldEvents.java @@ -1,5 +1,9 @@ package com.plotsquared.bukkit.listeners; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.util.UUIDHandler; +import com.plotsquared.bukkit.generator.BukkitGeneratorWrapper; +import com.plotsquared.bukkit.generator.BukkitPlotGenerator; import org.bukkit.World; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -8,11 +12,6 @@ import org.bukkit.event.world.WorldInitEvent; import org.bukkit.event.world.WorldLoadEvent; import org.bukkit.generator.ChunkGenerator; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.plotsquared.bukkit.generator.BukkitGeneratorWrapper; -import com.plotsquared.bukkit.generator.BukkitPlotGenerator; - public class WorldEvents implements Listener { public static String lastWorld = null; diff --git a/src/main/java/com/plotsquared/bukkit/listeners/worldedit/NullExtent.java b/src/main/java/com/plotsquared/bukkit/listeners/worldedit/NullExtent.java index 2d196ac1d..8cfa88546 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/worldedit/NullExtent.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/worldedit/NullExtent.java @@ -1,8 +1,5 @@ package com.plotsquared.bukkit.listeners.worldedit; -import java.util.ArrayList; -import java.util.List; - import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.Vector2D; import com.sk89q.worldedit.WorldEditException; @@ -15,6 +12,9 @@ import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.world.biome.BaseBiome; +import java.util.ArrayList; +import java.util.List; + public class NullExtent implements Extent { @Override diff --git a/src/main/java/com/plotsquared/bukkit/listeners/worldedit/ProcessedWEExtent.java b/src/main/java/com/plotsquared/bukkit/listeners/worldedit/ProcessedWEExtent.java index 25d93335c..05a93cbe0 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/worldedit/ProcessedWEExtent.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/worldedit/ProcessedWEExtent.java @@ -1,7 +1,5 @@ package com.plotsquared.bukkit.listeners.worldedit; -import java.util.HashSet; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.object.RegionWrapper; @@ -16,6 +14,8 @@ import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.world.biome.BaseBiome; +import java.util.HashSet; + public class ProcessedWEExtent extends AbstractDelegateExtent { private final HashSet mask; int BScount = 0; diff --git a/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WEExtent.java b/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WEExtent.java index 4656409fe..3451a9aa8 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WEExtent.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WEExtent.java @@ -1,7 +1,5 @@ package com.plotsquared.bukkit.listeners.worldedit; -import java.util.HashSet; - import com.intellectualcrafters.plot.object.RegionWrapper; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.Vector2D; @@ -14,6 +12,8 @@ import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.world.biome.BaseBiome; +import java.util.HashSet; + public class WEExtent extends AbstractDelegateExtent { private final HashSet mask; diff --git a/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WEListener.java b/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WEListener.java index 273b323c6..9ac4927cd 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WEListener.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WEListener.java @@ -1,16 +1,5 @@ package com.plotsquared.bukkit.listeners.worldedit; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; - -import org.bukkit.entity.Player; -import org.bukkit.event.Cancellable; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerCommandPreprocessEvent; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; @@ -22,6 +11,16 @@ import com.intellectualcrafters.plot.util.Permissions; import com.plotsquared.bukkit.util.bukkit.BukkitUtil; import com.sk89q.worldedit.BlockVector; import com.sk89q.worldedit.bukkit.selections.Selection; +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; public class WEListener implements Listener { diff --git a/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WEManager.java b/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WEManager.java index eecaf6142..1a0711e1d 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WEManager.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WEManager.java @@ -1,8 +1,5 @@ package com.plotsquared.bukkit.listeners.worldedit; -import java.util.HashSet; -import java.util.UUID; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.object.Location; @@ -11,6 +8,9 @@ import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.RegionWrapper; import com.intellectualcrafters.plot.util.MainUtil; +import java.util.HashSet; +import java.util.UUID; + public class WEManager { public static HashSet bypass = new HashSet<>(); @@ -39,10 +39,7 @@ public class WEManager { } public static boolean intersects(RegionWrapper region1, RegionWrapper region2) { - if ((region1.minX <= region2.maxX) && (region1.maxX >= region2.minX) && (region1.minZ <= region2.maxZ) && (region1.maxZ >= region2.minZ)) { - return true; - } - return false; + return (region1.minX <= region2.maxX) && (region1.maxX >= region2.minX) && (region1.minZ <= region2.maxZ) && (region1.maxZ >= region2.minZ); } public static boolean regionContains(RegionWrapper selection, HashSet mask) { diff --git a/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WESubscriber.java b/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WESubscriber.java index 62d5ee86a..6b2bee0bc 100644 --- a/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WESubscriber.java +++ b/src/main/java/com/plotsquared/bukkit/listeners/worldedit/WESubscriber.java @@ -1,7 +1,5 @@ package com.plotsquared.bukkit.listeners.worldedit; -import java.util.HashSet; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; @@ -15,6 +13,8 @@ import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.util.eventbus.EventHandler.Priority; import com.sk89q.worldedit.util.eventbus.Subscribe; +import java.util.HashSet; + public class WESubscriber { @Subscribe(priority=Priority.VERY_EARLY) public void onEditSession(EditSessionEvent event) { diff --git a/src/main/java/com/plotsquared/bukkit/object/BukkitOfflinePlayer.java b/src/main/java/com/plotsquared/bukkit/object/BukkitOfflinePlayer.java index ed0d2214c..5b511cfc3 100644 --- a/src/main/java/com/plotsquared/bukkit/object/BukkitOfflinePlayer.java +++ b/src/main/java/com/plotsquared/bukkit/object/BukkitOfflinePlayer.java @@ -1,10 +1,10 @@ package com.plotsquared.bukkit.object; -import java.util.UUID; - import com.intellectualcrafters.plot.object.OfflinePlotPlayer; import org.bukkit.OfflinePlayer; +import java.util.UUID; + public class BukkitOfflinePlayer implements OfflinePlotPlayer { public final OfflinePlayer player; diff --git a/src/main/java/com/plotsquared/bukkit/object/BukkitPlayer.java b/src/main/java/com/plotsquared/bukkit/object/BukkitPlayer.java index 07611dbab..0050f80cb 100644 --- a/src/main/java/com/plotsquared/bukkit/object/BukkitPlayer.java +++ b/src/main/java/com/plotsquared/bukkit/object/BukkitPlayer.java @@ -1,24 +1,22 @@ package com.plotsquared.bukkit.object; -import java.util.HashMap; -import java.util.HashSet; -import java.util.UUID; - +import com.intellectualcrafters.plot.commands.RequiredType; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.PlotPlayer; - +import com.intellectualcrafters.plot.util.EconHandler; +import com.intellectualcrafters.plot.util.MainUtil; +import com.intellectualcrafters.plot.util.UUIDHandler; +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.permissions.Permission; import org.bukkit.permissions.PermissionDefault; -import com.intellectualcrafters.plot.commands.RequiredType; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.util.EconHandler; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.HashMap; +import java.util.HashSet; +import java.util.UUID; public class BukkitPlayer implements PlotPlayer { @@ -98,10 +96,7 @@ public class BukkitPlayer implements PlotPlayer { @Override public boolean isOp() { if (this.op != 0) { - if (this.op == 1) { - return false; - } - return true; + return this.op != 1; } final boolean result = this.player.isOp(); if (!result) { diff --git a/src/main/java/com/plotsquared/bukkit/object/InfoInventory.java b/src/main/java/com/plotsquared/bukkit/object/InfoInventory.java index 79dde8c97..fe363524d 100644 --- a/src/main/java/com/plotsquared/bukkit/object/InfoInventory.java +++ b/src/main/java/com/plotsquared/bukkit/object/InfoInventory.java @@ -1,13 +1,9 @@ package com.plotsquared.bukkit.object; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.UUIDHandler; - +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -17,7 +13,9 @@ import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; /** * Created 2014-11-18 for PlotSquared diff --git a/src/main/java/com/plotsquared/bukkit/object/PlotPopulator.java b/src/main/java/com/plotsquared/bukkit/object/PlotPopulator.java index cddb69cb9..3975a508d 100644 --- a/src/main/java/com/plotsquared/bukkit/object/PlotPopulator.java +++ b/src/main/java/com/plotsquared/bukkit/object/PlotPopulator.java @@ -1,18 +1,17 @@ package com.plotsquared.bukkit.object; -import java.util.HashMap; -import java.util.Map.Entry; -import java.util.Random; - import com.intellectualcrafters.plot.object.PlotLoc; import com.intellectualcrafters.plot.object.PseudoRandom; import com.intellectualcrafters.plot.object.RegionWrapper; +import com.intellectualcrafters.plot.util.ChunkManager; +import com.plotsquared.bukkit.util.bukkit.BukkitUtil; import org.bukkit.Chunk; import org.bukkit.World; import org.bukkit.generator.BlockPopulator; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.plotsquared.bukkit.util.bukkit.BukkitUtil; +import java.util.HashMap; +import java.util.Map.Entry; +import java.util.Random; public abstract class PlotPopulator extends BlockPopulator { diff --git a/src/main/java/com/plotsquared/bukkit/object/comment/CommentManager.java b/src/main/java/com/plotsquared/bukkit/object/comment/CommentManager.java index 3a41bd7b3..78ad77e51 100644 --- a/src/main/java/com/plotsquared/bukkit/object/comment/CommentManager.java +++ b/src/main/java/com/plotsquared/bukkit/object/comment/CommentManager.java @@ -1,20 +1,19 @@ package com.plotsquared.bukkit.object.comment; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.concurrent.atomic.AtomicInteger; - -import com.intellectualcrafters.plot.object.comment.*; -import org.bukkit.ChatColor; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.RunnableVal; -import com.plotsquared.bukkit.titles.AbstractTitle; +import com.intellectualcrafters.plot.object.comment.*; import com.intellectualcrafters.plot.util.TaskManager; +import com.plotsquared.bukkit.titles.AbstractTitle; +import org.bukkit.ChatColor; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.concurrent.atomic.AtomicInteger; public class CommentManager { diff --git a/src/main/java/com/plotsquared/bukkit/object/entity/EntityWrapper.java b/src/main/java/com/plotsquared/bukkit/object/entity/EntityWrapper.java index dee6b2938..5fff010d6 100644 --- a/src/main/java/com/plotsquared/bukkit/object/entity/EntityWrapper.java +++ b/src/main/java/com/plotsquared/bukkit/object/entity/EntityWrapper.java @@ -1,42 +1,24 @@ package com.plotsquared.bukkit.object.entity; +import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.object.entity.AgeableStats; import com.intellectualcrafters.plot.object.entity.ArmorStandStats; import com.intellectualcrafters.plot.object.entity.EntityBaseStats; import com.intellectualcrafters.plot.object.entity.HorseStats; -import org.bukkit.Art; -import org.bukkit.DyeColor; -import org.bukkit.Location; -import org.bukkit.Rotation; -import org.bukkit.World; +import org.bukkit.*; import org.bukkit.block.BlockFace; -import org.bukkit.entity.Ageable; -import org.bukkit.entity.ArmorStand; -import org.bukkit.entity.Entity; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.Guardian; -import org.bukkit.entity.Horse; +import org.bukkit.entity.*; import org.bukkit.entity.Horse.Color; import org.bukkit.entity.Horse.Style; import org.bukkit.entity.Horse.Variant; -import org.bukkit.entity.Item; -import org.bukkit.entity.ItemFrame; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Painting; -import org.bukkit.entity.Rabbit; import org.bukkit.entity.Rabbit.Type; -import org.bukkit.entity.Sheep; -import org.bukkit.entity.Skeleton; import org.bukkit.entity.Skeleton.SkeletonType; -import org.bukkit.entity.Tameable; import org.bukkit.inventory.EntityEquipment; import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; import org.bukkit.util.EulerAngle; import org.bukkit.util.Vector; -import com.intellectualcrafters.plot.PS; - public class EntityWrapper { public short id; public float yaw; diff --git a/src/main/java/com/plotsquared/bukkit/object/entity/LivingEntityStats.java b/src/main/java/com/plotsquared/bukkit/object/entity/LivingEntityStats.java index 42ceea6ee..9e52a97c0 100644 --- a/src/main/java/com/plotsquared/bukkit/object/entity/LivingEntityStats.java +++ b/src/main/java/com/plotsquared/bukkit/object/entity/LivingEntityStats.java @@ -1,10 +1,10 @@ package com.plotsquared.bukkit.object.entity; -import java.util.Collection; - import org.bukkit.inventory.ItemStack; import org.bukkit.potion.PotionEffect; +import java.util.Collection; + public class LivingEntityStats { public boolean loot; public String name; diff --git a/src/main/java/com/plotsquared/bukkit/object/schematic/StateWrapper.java b/src/main/java/com/plotsquared/bukkit/object/schematic/StateWrapper.java index bb96e6c41..2559ce405 100644 --- a/src/main/java/com/plotsquared/bukkit/object/schematic/StateWrapper.java +++ b/src/main/java/com/plotsquared/bukkit/object/schematic/StateWrapper.java @@ -1,28 +1,21 @@ package com.plotsquared.bukkit.object.schematic; +import com.intellectualcrafters.jnbt.*; +import com.intellectualcrafters.plot.object.schematic.ItemType; +import com.intellectualcrafters.plot.object.schematic.PlotItem; +import com.intellectualcrafters.plot.util.MathMan; +import com.intellectualcrafters.plot.util.SchematicHandler.Schematic; +import org.bukkit.block.BlockState; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.inventory.InventoryHolder; +import org.bukkit.inventory.ItemStack; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import com.intellectualcrafters.plot.object.schematic.ItemType; -import com.intellectualcrafters.plot.object.schematic.PlotItem; - -import org.bukkit.block.BlockState; -import org.bukkit.enchantments.Enchantment; -import org.bukkit.inventory.InventoryHolder; -import org.bukkit.inventory.ItemStack; - -import com.intellectualcrafters.jnbt.ByteTag; -import com.intellectualcrafters.jnbt.CompoundTag; -import com.intellectualcrafters.jnbt.ListTag; -import com.intellectualcrafters.jnbt.ShortTag; -import com.intellectualcrafters.jnbt.Tag; -import com.intellectualcrafters.plot.util.MathMan; -import com.intellectualcrafters.plot.util.SchematicHandler.Schematic; -import com.intellectualcrafters.plot.util.StringMan; - public class StateWrapper { public BlockState state = null; diff --git a/src/main/java/com/plotsquared/bukkit/titles/AbstractTitle.java b/src/main/java/com/plotsquared/bukkit/titles/AbstractTitle.java index dd0fd88c7..14ad2523b 100644 --- a/src/main/java/com/plotsquared/bukkit/titles/AbstractTitle.java +++ b/src/main/java/com/plotsquared/bukkit/titles/AbstractTitle.java @@ -1,8 +1,7 @@ package com.plotsquared.bukkit.titles; -import org.bukkit.ChatColor; - import com.intellectualcrafters.plot.object.PlotPlayer; +import org.bukkit.ChatColor; public abstract class AbstractTitle { public static AbstractTitle TITLE_CLASS; diff --git a/src/main/java/com/plotsquared/bukkit/titles/DefaultTitle.java b/src/main/java/com/plotsquared/bukkit/titles/DefaultTitle.java index e364ba41a..a34464ccf 100644 --- a/src/main/java/com/plotsquared/bukkit/titles/DefaultTitle.java +++ b/src/main/java/com/plotsquared/bukkit/titles/DefaultTitle.java @@ -1,9 +1,8 @@ package com.plotsquared.bukkit.titles; -import org.bukkit.ChatColor; - -import com.plotsquared.bukkit.object.BukkitPlayer; import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.bukkit.object.BukkitPlayer; +import org.bukkit.ChatColor; public class DefaultTitle extends AbstractTitle { @Override diff --git a/src/main/java/com/plotsquared/bukkit/titles/DefaultTitleManager.java b/src/main/java/com/plotsquared/bukkit/titles/DefaultTitleManager.java index 4ccd2e29d..5fe257c1a 100644 --- a/src/main/java/com/plotsquared/bukkit/titles/DefaultTitleManager.java +++ b/src/main/java/com/plotsquared/bukkit/titles/DefaultTitleManager.java @@ -1,15 +1,15 @@ package com.plotsquared.bukkit.titles; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.entity.Player; + import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; 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; - /** * [ PlotSquared DefaultTitleManager by Maxim Van de Wynckel ] * diff --git a/src/main/java/com/plotsquared/bukkit/titles/DefaultTitleManager_183.java b/src/main/java/com/plotsquared/bukkit/titles/DefaultTitleManager_183.java index ee8847551..2bd300637 100644 --- a/src/main/java/com/plotsquared/bukkit/titles/DefaultTitleManager_183.java +++ b/src/main/java/com/plotsquared/bukkit/titles/DefaultTitleManager_183.java @@ -1,15 +1,15 @@ package com.plotsquared.bukkit.titles; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.entity.Player; + import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; 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; - /** * [ PlotSquared DefaultTitleManager by Maxim Van de Wynckel ] * diff --git a/src/main/java/com/plotsquared/bukkit/titles/DefaultTitle_183.java b/src/main/java/com/plotsquared/bukkit/titles/DefaultTitle_183.java index 2ccc1bd69..ebfb09eee 100644 --- a/src/main/java/com/plotsquared/bukkit/titles/DefaultTitle_183.java +++ b/src/main/java/com/plotsquared/bukkit/titles/DefaultTitle_183.java @@ -1,9 +1,8 @@ package com.plotsquared.bukkit.titles; -import org.bukkit.ChatColor; - -import com.plotsquared.bukkit.object.BukkitPlayer; import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.bukkit.object.BukkitPlayer; +import org.bukkit.ChatColor; public class DefaultTitle_183 extends AbstractTitle { @Override diff --git a/src/main/java/com/plotsquared/bukkit/titles/HackTitle.java b/src/main/java/com/plotsquared/bukkit/titles/HackTitle.java index da222666d..00c717914 100644 --- a/src/main/java/com/plotsquared/bukkit/titles/HackTitle.java +++ b/src/main/java/com/plotsquared/bukkit/titles/HackTitle.java @@ -1,11 +1,10 @@ package com.plotsquared.bukkit.titles; -import org.bukkit.ChatColor; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.Settings; -import com.plotsquared.bukkit.object.BukkitPlayer; import com.intellectualcrafters.plot.object.PlotPlayer; +import com.plotsquared.bukkit.object.BukkitPlayer; +import org.bukkit.ChatColor; public class HackTitle extends AbstractTitle { @Override diff --git a/src/main/java/com/plotsquared/bukkit/titles/HackTitleManager.java b/src/main/java/com/plotsquared/bukkit/titles/HackTitleManager.java index b218280de..92d22377d 100644 --- a/src/main/java/com/plotsquared/bukkit/titles/HackTitleManager.java +++ b/src/main/java/com/plotsquared/bukkit/titles/HackTitleManager.java @@ -1,14 +1,14 @@ package com.plotsquared.bukkit.titles; +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/src/main/java/com/plotsquared/bukkit/util/ReflectionUtil.java b/src/main/java/com/plotsquared/bukkit/util/ReflectionUtil.java index 370e5ce59..4a9f76a3a 100644 --- a/src/main/java/com/plotsquared/bukkit/util/ReflectionUtil.java +++ b/src/main/java/com/plotsquared/bukkit/util/ReflectionUtil.java @@ -1,12 +1,12 @@ package com.plotsquared.bukkit.util; +import org.bukkit.Bukkit; + import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import org.bukkit.Bukkit; - /** * Reflection Utilities for minecraft * diff --git a/src/main/java/com/plotsquared/bukkit/util/SetupUtils.java b/src/main/java/com/plotsquared/bukkit/util/SetupUtils.java index d163cfc37..fd9d2a7fb 100644 --- a/src/main/java/com/plotsquared/bukkit/util/SetupUtils.java +++ b/src/main/java/com/plotsquared/bukkit/util/SetupUtils.java @@ -1,12 +1,11 @@ package com.plotsquared.bukkit.util; -import java.util.HashMap; -import java.util.Map; - -import org.bukkit.generator.ChunkGenerator; - import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.object.SetupObject; +import org.bukkit.generator.ChunkGenerator; + +import java.util.HashMap; +import java.util.Map; public abstract class SetupUtils { diff --git a/src/main/java/com/plotsquared/bukkit/util/WorldEditSchematic.java b/src/main/java/com/plotsquared/bukkit/util/WorldEditSchematic.java index 212373365..0f4ffca66 100644 --- a/src/main/java/com/plotsquared/bukkit/util/WorldEditSchematic.java +++ b/src/main/java/com/plotsquared/bukkit/util/WorldEditSchematic.java @@ -1,17 +1,16 @@ package com.plotsquared.bukkit.util; -import java.io.File; - -import com.intellectualcrafters.plot.util.MainUtil; -import org.bukkit.Bukkit; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.util.MainUtil; import com.sk89q.worldedit.CuboidClipboard; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.bukkit.BukkitWorld; +import org.bukkit.Bukkit; + +import java.io.File; public class WorldEditSchematic { public void saveSchematic(String file, final String world, final PlotId id) { diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitChunkManager.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitChunkManager.java index 37d71b6e8..c1c2f5383 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitChunkManager.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitChunkManager.java @@ -1,69 +1,28 @@ package com.plotsquared.bukkit.util.bukkit; -import com.plotsquared.bukkit.BukkitMain; import com.intellectualcrafters.plot.PS; -import com.plotsquared.bukkit.generator.AugmentedPopulator; -import com.intellectualcrafters.plot.object.BlockLoc; -import com.intellectualcrafters.plot.object.ChunkLoc; +import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotLoc; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.RegionWrapper; -import com.plotsquared.bukkit.object.entity.EntityWrapper; import com.intellectualcrafters.plot.util.ChunkManager; import com.intellectualcrafters.plot.util.ClusterManager; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.SetBlockQueue.ChunkWrapper; import com.intellectualcrafters.plot.util.TaskManager; - -import org.bukkit.Bukkit; -import org.bukkit.Chunk; -import org.bukkit.DyeColor; -import org.bukkit.Material; -import org.bukkit.Note; -import org.bukkit.SkullType; -import org.bukkit.World; -import org.bukkit.block.Banner; -import org.bukkit.block.Beacon; -import org.bukkit.block.Block; -import org.bukkit.block.BlockFace; -import org.bukkit.block.BlockState; -import org.bukkit.block.BrewingStand; -import org.bukkit.block.Chest; -import org.bukkit.block.CommandBlock; -import org.bukkit.block.CreatureSpawner; -import org.bukkit.block.Dispenser; -import org.bukkit.block.Dropper; -import org.bukkit.block.Furnace; -import org.bukkit.block.Hopper; -import org.bukkit.block.Jukebox; -import org.bukkit.block.NoteBlock; -import org.bukkit.block.Sign; -import org.bukkit.block.Skull; +import com.plotsquared.bukkit.BukkitMain; +import com.plotsquared.bukkit.generator.AugmentedPopulator; +import com.plotsquared.bukkit.object.entity.EntityWrapper; +import org.bukkit.*; +import org.bukkit.block.*; import org.bukkit.block.banner.Pattern; import org.bukkit.block.banner.PatternType; -import org.bukkit.entity.Animals; -import org.bukkit.entity.Creature; -import org.bukkit.entity.Entity; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.Player; -import org.bukkit.entity.Vehicle; +import org.bukkit.entity.*; import org.bukkit.generator.BlockPopulator; import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.Plugin; import java.io.File; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Random; +import java.util.*; import java.util.concurrent.atomic.AtomicInteger; public class BukkitChunkManager extends ChunkManager { @@ -285,7 +244,7 @@ public class BukkitChunkManager extends ChunkManager { return; } } - }; + } }, 1, 1); TaskManager.tasks.put(currentIndex, task); } diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitEconHandler.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitEconHandler.java index 1d9c461dc..3d279c70f 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitEconHandler.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitEconHandler.java @@ -1,16 +1,14 @@ package com.plotsquared.bukkit.util.bukkit; -import net.milkbowl.vault.economy.Economy; -import net.milkbowl.vault.permission.Permission; - -import org.bukkit.Bukkit; -import org.bukkit.plugin.RegisteredServiceProvider; - -import com.plotsquared.bukkit.object.BukkitOfflinePlayer; -import com.plotsquared.bukkit.object.BukkitPlayer; import com.intellectualcrafters.plot.object.OfflinePlotPlayer; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.EconHandler; +import com.plotsquared.bukkit.object.BukkitOfflinePlayer; +import com.plotsquared.bukkit.object.BukkitPlayer; +import net.milkbowl.vault.economy.Economy; +import net.milkbowl.vault.permission.Permission; +import org.bukkit.Bukkit; +import org.bukkit.plugin.RegisteredServiceProvider; public class BukkitEconHandler extends EconHandler { diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitEventUtil.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitEventUtil.java index 05c807757..5f91be408 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitEventUtil.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitEventUtil.java @@ -1,35 +1,17 @@ package com.plotsquared.bukkit.util.bukkit; -import java.util.ArrayList; -import java.util.UUID; - +import com.intellectualcrafters.plot.flag.Flag; +import com.intellectualcrafters.plot.object.*; +import com.intellectualcrafters.plot.util.EventUtil; +import com.plotsquared.bukkit.events.*; +import com.plotsquared.bukkit.object.BukkitPlayer; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; -import com.plotsquared.bukkit.events.ClusterFlagRemoveEvent; -import com.plotsquared.bukkit.events.PlayerClaimPlotEvent; -import com.plotsquared.bukkit.events.PlayerEnterPlotEvent; -import com.plotsquared.bukkit.events.PlayerLeavePlotEvent; -import com.plotsquared.bukkit.events.PlayerPlotDeniedEvent; -import com.plotsquared.bukkit.events.PlayerPlotHelperEvent; -import com.plotsquared.bukkit.events.PlayerPlotTrustedEvent; -import com.plotsquared.bukkit.events.PlayerTeleportToPlotEvent; -import com.plotsquared.bukkit.events.PlotClearEvent; -import com.plotsquared.bukkit.events.PlotDeleteEvent; -import com.plotsquared.bukkit.events.PlotFlagAddEvent; -import com.plotsquared.bukkit.events.PlotFlagRemoveEvent; -import com.plotsquared.bukkit.events.PlotMergeEvent; -import com.plotsquared.bukkit.events.PlotUnlinkEvent; -import com.intellectualcrafters.plot.flag.Flag; -import com.plotsquared.bukkit.object.BukkitPlayer; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.object.PlotCluster; -import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.EventUtil; +import java.util.ArrayList; +import java.util.UUID; public class BukkitEventUtil extends EventUtil { diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitInventoryUtil.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitInventoryUtil.java index 183bae0e4..1ceb27001 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitInventoryUtil.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitInventoryUtil.java @@ -1,8 +1,10 @@ package com.plotsquared.bukkit.util.bukkit; -import java.util.ArrayList; -import java.util.List; - +import com.intellectualcrafters.plot.object.PlotInventory; +import com.intellectualcrafters.plot.object.PlotItemStack; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.InventoryUtil; +import com.plotsquared.bukkit.object.BukkitPlayer; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.event.inventory.InventoryType; @@ -12,11 +14,8 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.PlayerInventory; import org.bukkit.inventory.meta.ItemMeta; -import com.plotsquared.bukkit.object.BukkitPlayer; -import com.intellectualcrafters.plot.object.PlotInventory; -import com.intellectualcrafters.plot.object.PlotItemStack; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.InventoryUtil; +import java.util.ArrayList; +import java.util.List; public class BukkitInventoryUtil extends InventoryUtil { diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitPlayerFunctions.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitPlayerFunctions.java index 861e4ba5c..ef5fe5287 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitPlayerFunctions.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitPlayerFunctions.java @@ -20,19 +20,18 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.util.bukkit; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; - -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.UUIDHandler; +import org.bukkit.entity.Player; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; /** * Functions involving players, plots and locations. diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitPlayerManager.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitPlayerManager.java index 265476136..3897583f3 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitPlayerManager.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitPlayerManager.java @@ -1,8 +1,8 @@ package com.plotsquared.bukkit.util.bukkit; -import com.plotsquared.bukkit.object.BukkitPlayer; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.PlayerManager; +import com.plotsquared.bukkit.object.BukkitPlayer; public class BukkitPlayerManager extends PlayerManager { diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitSchematicHandler.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitSchematicHandler.java index 78d0a99e9..a7bfac236 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitSchematicHandler.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitSchematicHandler.java @@ -20,31 +20,24 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.util.bukkit; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - +import com.intellectualcrafters.jnbt.*; +import com.intellectualcrafters.plot.object.ChunkLoc; +import com.intellectualcrafters.plot.object.Location; +import com.intellectualcrafters.plot.object.RunnableVal; import com.intellectualcrafters.plot.util.SchematicHandler; import com.intellectualcrafters.plot.util.TaskManager; +import com.plotsquared.bukkit.object.schematic.StateWrapper; import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.block.BlockState; -import com.intellectualcrafters.jnbt.ByteArrayTag; -import com.intellectualcrafters.jnbt.CompoundTag; -import com.intellectualcrafters.jnbt.IntTag; -import com.intellectualcrafters.jnbt.ListTag; -import com.intellectualcrafters.jnbt.ShortTag; -import com.intellectualcrafters.jnbt.StringTag; -import com.intellectualcrafters.jnbt.Tag; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.RunnableVal; -import com.plotsquared.bukkit.object.schematic.StateWrapper; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; /** * Schematic Handler diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitSetBlockManager.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitSetBlockManager.java index 7bf6eb32c..70ecf61a8 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitSetBlockManager.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitSetBlockManager.java @@ -1,13 +1,12 @@ package com.plotsquared.bukkit.util.bukkit; -import java.util.ArrayList; -import java.util.Collection; - -import org.bukkit.Chunk; -import org.bukkit.World; - import com.intellectualcrafters.plot.object.ChunkLoc; import com.intellectualcrafters.plot.util.BlockUpdateUtil; +import org.bukkit.Chunk; +import org.bukkit.World; + +import java.util.ArrayList; +import java.util.Collection; public abstract class BukkitSetBlockManager extends BlockUpdateUtil { public static BukkitSetBlockManager setBlockManager = null; diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitSetupUtils.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitSetupUtils.java index 46043ca1b..f80a64371 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitSetupUtils.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitSetupUtils.java @@ -1,8 +1,11 @@ package com.plotsquared.bukkit.util.bukkit; -import java.io.IOException; -import java.util.Map.Entry; - +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.ConfigurationNode; +import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.object.SetupObject; +import com.plotsquared.bukkit.generator.BukkitPlotGenerator; +import com.plotsquared.bukkit.util.SetupUtils; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.World.Environment; @@ -10,12 +13,8 @@ import org.bukkit.WorldCreator; import org.bukkit.generator.ChunkGenerator; import org.bukkit.plugin.Plugin; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.ConfigurationNode; -import com.plotsquared.bukkit.generator.BukkitPlotGenerator; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.SetupObject; -import com.plotsquared.bukkit.util.SetupUtils; +import java.io.IOException; +import java.util.Map.Entry; public class BukkitSetupUtils extends SetupUtils { diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitTaskManager.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitTaskManager.java index 72f5d8256..20d0c1637 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitTaskManager.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitTaskManager.java @@ -1,9 +1,8 @@ package com.plotsquared.bukkit.util.bukkit; -import org.bukkit.Bukkit; - -import com.plotsquared.bukkit.BukkitMain; import com.intellectualcrafters.plot.util.TaskManager; +import com.plotsquared.bukkit.BukkitMain; +import org.bukkit.Bukkit; public class BukkitTaskManager extends TaskManager { @Override diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitUtil.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitUtil.java index f88a1ed7a..f0be51c23 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitUtil.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/BukkitUtil.java @@ -1,14 +1,13 @@ package com.plotsquared.bukkit.util.bukkit; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; - -import org.bukkit.Bukkit; -import org.bukkit.Chunk; -import org.bukkit.Material; -import org.bukkit.OfflinePlayer; -import org.bukkit.World; +import com.intellectualcrafters.plot.object.ChunkLoc; +import com.intellectualcrafters.plot.object.Location; +import com.intellectualcrafters.plot.object.PlotBlock; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.object.schematic.PlotItem; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.bukkit.object.BukkitPlayer; +import org.bukkit.*; import org.bukkit.block.Biome; import org.bukkit.block.Block; import org.bukkit.block.BlockState; @@ -18,24 +17,11 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; -import org.bukkit.material.MaterialData; -import org.bukkit.material.Sandstone; -import org.bukkit.material.Step; -import org.bukkit.material.Tree; -import org.bukkit.material.WoodenStep; -import org.bukkit.material.Wool; +import org.bukkit.material.*; -import com.plotsquared.bukkit.object.BukkitPlayer; -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.object.Location; -import com.intellectualcrafters.plot.object.PlotBlock; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.object.schematic.PlotItem; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.intellectualcrafters.plot.util.MathMan; -import com.intellectualcrafters.plot.util.StringComparison; -import com.intellectualcrafters.plot.util.UUIDHandler; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; public class BukkitUtil extends BlockManager { private static HashMap worlds = new HashMap<>(); diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/Metrics.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/Metrics.java index 2f38e435f..e05a46fcb 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/Metrics.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/Metrics.java @@ -20,36 +20,24 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.util.bukkit; -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 com.intellectualcrafters.configuration.InvalidConfigurationException; +import com.intellectualcrafters.configuration.file.YamlConfiguration; +import com.intellectualcrafters.plot.PS; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.scheduler.BukkitTask; -import com.intellectualcrafters.configuration.InvalidConfigurationException; -import com.intellectualcrafters.configuration.file.YamlConfiguration; -import com.intellectualcrafters.plot.PS; +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 { /** diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/OfflinePlayerUtil.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/OfflinePlayerUtil.java index e44498d50..0dfeca43c 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/OfflinePlayerUtil.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/OfflinePlayerUtil.java @@ -1,22 +1,16 @@ package com.plotsquared.bukkit.util.bukkit; -import static com.intellectualcrafters.plot.util.ReflectionUtils.callConstructor; -import static com.intellectualcrafters.plot.util.ReflectionUtils.callMethod; -import static com.intellectualcrafters.plot.util.ReflectionUtils.getCbClass; -import static com.intellectualcrafters.plot.util.ReflectionUtils.getNmsClass; -import static com.intellectualcrafters.plot.util.ReflectionUtils.getUtilClass; -import static com.intellectualcrafters.plot.util.ReflectionUtils.makeConstructor; -import static com.intellectualcrafters.plot.util.ReflectionUtils.makeMethod; - -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; -import java.util.UUID; - import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.util.UUID; + +import static com.intellectualcrafters.plot.util.ReflectionUtils.*; + public class OfflinePlayerUtil { public static Player loadPlayer(final String name) { diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/SendChunk.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/SendChunk.java index 4f963cfda..95a12f011 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/SendChunk.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/SendChunk.java @@ -1,21 +1,20 @@ package com.plotsquared.bukkit.util.bukkit; -import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.bukkit.Bukkit; -import org.bukkit.Chunk; -import org.bukkit.World; - import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.object.ChunkLoc; 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 org.bukkit.World; + +import java.util.ArrayList; +import java.util.Collection; +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/src/main/java/com/plotsquared/bukkit/util/bukkit/SetBlockFast.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/SetBlockFast.java index 95b1378eb..e6a47f3c8 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/SetBlockFast.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/SetBlockFast.java @@ -20,18 +20,17 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.util.bukkit; -import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass; - -import java.util.Collection; -import java.util.HashMap; - -import org.bukkit.Chunk; - import com.intellectualcrafters.plot.object.ChunkLoc; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.ReflectionUtils.RefClass; import com.intellectualcrafters.plot.util.ReflectionUtils.RefMethod; import com.intellectualcrafters.plot.util.TaskManager; +import org.bukkit.Chunk; + +import java.util.Collection; +import java.util.HashMap; + +import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass; /** * SetBlockFast class
Used to do fast world editing diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/SetBlockFast_1_8.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/SetBlockFast_1_8.java index 989c6137a..b5a0a7c82 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/SetBlockFast_1_8.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/SetBlockFast_1_8.java @@ -20,7 +20,15 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.plotsquared.bukkit.util.bukkit; -import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass; +import com.intellectualcrafters.plot.object.ChunkLoc; +import com.intellectualcrafters.plot.util.MainUtil; +import com.intellectualcrafters.plot.util.ReflectionUtils.RefClass; +import com.intellectualcrafters.plot.util.ReflectionUtils.RefConstructor; +import com.intellectualcrafters.plot.util.ReflectionUtils.RefMethod; +import com.intellectualcrafters.plot.util.TaskManager; +import org.bukkit.Chunk; +import org.bukkit.World; +import org.bukkit.block.Block; import java.util.ArrayList; import java.util.Collection; @@ -28,16 +36,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map.Entry; -import org.bukkit.Chunk; -import org.bukkit.World; -import org.bukkit.block.Block; - -import com.intellectualcrafters.plot.object.ChunkLoc; -import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.ReflectionUtils.RefClass; -import com.intellectualcrafters.plot.util.ReflectionUtils.RefConstructor; -import com.intellectualcrafters.plot.util.ReflectionUtils.RefMethod; -import com.intellectualcrafters.plot.util.TaskManager; +import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass; /** * SetBlockFast class
Used to do fast world editing diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/SetBlockSlow.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/SetBlockSlow.java index c892dedcd..73641b027 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/SetBlockSlow.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/SetBlockSlow.java @@ -1,12 +1,11 @@ package com.plotsquared.bukkit.util.bukkit; -import java.util.Collection; - +import com.intellectualcrafters.plot.util.MainUtil; import org.bukkit.Chunk; import org.bukkit.World; import org.bukkit.block.Block; -import com.intellectualcrafters.plot.util.MainUtil; +import java.util.Collection; public class SetBlockSlow extends BukkitSetBlockManager { @Override diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/SetGenCB.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/SetGenCB.java index 77ff9d854..24cca00b9 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/SetGenCB.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/SetGenCB.java @@ -1,18 +1,17 @@ package com.plotsquared.bukkit.util.bukkit; +import com.intellectualcrafters.plot.PS; +import com.plotsquared.bukkit.generator.AugmentedPopulator; +import com.plotsquared.bukkit.util.SetupUtils; +import org.bukkit.World; +import org.bukkit.generator.BlockPopulator; +import org.bukkit.generator.ChunkGenerator; + import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Iterator; -import org.bukkit.World; -import org.bukkit.generator.BlockPopulator; -import org.bukkit.generator.ChunkGenerator; - -import com.intellectualcrafters.plot.PS; -import com.plotsquared.bukkit.generator.AugmentedPopulator; -import com.plotsquared.bukkit.util.SetupUtils; - public class SetGenCB { public static void setGenerator(World world) throws Exception { SetupUtils.manager.updateGenerators(); diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/ArrayWrapper.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/ArrayWrapper.java index d9d38ea15..d29f9d135 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/ArrayWrapper.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/ArrayWrapper.java @@ -1,11 +1,11 @@ package com.plotsquared.bukkit.util.bukkit.chat; +import org.apache.commons.lang.Validate; + import java.lang.reflect.Array; import java.util.Arrays; import java.util.Collection; -import org.apache.commons.lang.Validate; - /** * Represents a wrapper around an array class of an arbitrary reference type, * which properly implements "value" hash code and equality functions. diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/FancyMessage.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/FancyMessage.java index d2857d4af..25905bdfd 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/FancyMessage.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/FancyMessage.java @@ -1,33 +1,5 @@ package com.plotsquared.bukkit.util.bukkit.chat; -import static com.plotsquared.bukkit.util.bukkit.chat.TextualComponent.rawText; - -import java.io.IOException; -import java.io.StringWriter; -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; - -import org.bukkit.Achievement; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.Material; -import org.bukkit.Statistic; -import org.bukkit.Statistic.Type; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; - import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -35,6 +7,20 @@ import com.google.gson.JsonParser; import com.google.gson.stream.JsonWriter; import com.intellectualcrafters.configuration.serialization.ConfigurationSerializable; import com.intellectualcrafters.configuration.serialization.ConfigurationSerialization; +import org.bukkit.*; +import org.bukkit.Statistic.Type; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +import java.io.IOException; +import java.io.StringWriter; +import java.lang.reflect.*; +import java.util.*; +import java.util.logging.Level; + +import static com.plotsquared.bukkit.util.bukkit.chat.TextualComponent.rawText; /** * Represents a formattable message. Such messages can use elements such as colors, formatting codes, hover and click data, and other features provided by the vanilla Minecraft JSON message formatter. diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/JsonRepresentedObject.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/JsonRepresentedObject.java index ef5562a2c..1793ff8c9 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/JsonRepresentedObject.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/JsonRepresentedObject.java @@ -1,9 +1,9 @@ package com.plotsquared.bukkit.util.bukkit.chat; -import java.io.IOException; - import com.google.gson.stream.JsonWriter; +import java.io.IOException; + /** * Represents an object that can be serialized to a JSON writer instance. */ @@ -14,6 +14,6 @@ interface JsonRepresentedObject { * @param writer The JSON writer which will receive the object. * @throws IOException If an error occurs writing to the stream. */ - public void writeJson(JsonWriter writer) throws IOException; + void writeJson(JsonWriter writer) throws IOException; } diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/JsonString.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/JsonString.java index 071536ad9..2d9808575 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/JsonString.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/JsonString.java @@ -1,12 +1,12 @@ package com.plotsquared.bukkit.util.bukkit.chat; +import com.google.gson.stream.JsonWriter; +import com.intellectualcrafters.configuration.serialization.ConfigurationSerializable; + import java.io.IOException; import java.util.HashMap; import java.util.Map; -import com.google.gson.stream.JsonWriter; -import com.intellectualcrafters.configuration.serialization.ConfigurationSerializable; - /** * Represents a JSON string value. * Writes by this object will not write name values nor begin/end objects in the JSON stream. diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/MessagePart.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/MessagePart.java index c5105b5fd..1169376c8 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/MessagePart.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/MessagePart.java @@ -1,19 +1,18 @@ package com.plotsquared.bukkit.util.bukkit.chat; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; - -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; - import com.google.common.collect.BiMap; import com.google.common.collect.ImmutableBiMap; import com.google.gson.stream.JsonWriter; import com.intellectualcrafters.configuration.serialization.ConfigurationSerializable; import com.intellectualcrafters.configuration.serialization.ConfigurationSerialization; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; /** * Internal class: Represents a component of a JSON-serializable {@link FancyMessage}. diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/Reflection.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/Reflection.java index 2a8523a12..5b479cfb4 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/Reflection.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/Reflection.java @@ -1,13 +1,13 @@ package com.plotsquared.bukkit.util.bukkit.chat; +import org.bukkit.Bukkit; + import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import org.bukkit.Bukkit; - /** * A class containing static utility methods and caches which are intended as reflective conveniences. * Unless otherwise noted, upon failure methods will return {@code null}. diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/TextualComponent.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/TextualComponent.java index d46305fa5..fa83caa9b 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/TextualComponent.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/chat/TextualComponent.java @@ -1,15 +1,15 @@ package com.plotsquared.bukkit.util.bukkit.chat; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import com.google.gson.stream.JsonWriter; import com.intellectualcrafters.configuration.serialization.ConfigurationSerializable; import com.intellectualcrafters.configuration.serialization.ConfigurationSerialization; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + /** * Represents a textual component of a message part. * This can be used to not only represent string literals in a JSON message, diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/uuid/FileUUIDHandler.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/uuid/FileUUIDHandler.java index ed3545d73..f5c64a3da 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/uuid/FileUUIDHandler.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/uuid/FileUUIDHandler.java @@ -1,16 +1,5 @@ package com.plotsquared.bukkit.util.bukkit.uuid; -import java.io.File; -import java.io.FileInputStream; -import java.io.FilenameFilter; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.UUID; - -import org.bukkit.Bukkit; -import org.bukkit.World; - import com.google.common.collect.HashBiMap; import com.google.common.io.Files; import com.google.common.io.InputSupplier; @@ -21,12 +10,18 @@ import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.OfflinePlotPlayer; import com.intellectualcrafters.plot.object.RunnableVal; import com.intellectualcrafters.plot.object.StringWrapper; -import com.intellectualcrafters.plot.util.ExpireManager; -import com.intellectualcrafters.plot.util.NbtFactory; -import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualcrafters.plot.util.UUIDHandlerImplementation; +import com.intellectualcrafters.plot.util.*; import com.intellectualcrafters.plot.uuid.UUIDWrapper; +import org.bukkit.Bukkit; +import org.bukkit.World; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FilenameFilter; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.UUID; public class FileUUIDHandler extends UUIDHandlerImplementation { diff --git a/src/main/java/com/plotsquared/bukkit/util/bukkit/uuid/SQLUUIDHandler.java b/src/main/java/com/plotsquared/bukkit/util/bukkit/uuid/SQLUUIDHandler.java index 64d2c140b..52d6e2450 100644 --- a/src/main/java/com/plotsquared/bukkit/util/bukkit/uuid/SQLUUIDHandler.java +++ b/src/main/java/com/plotsquared/bukkit/util/bukkit/uuid/SQLUUIDHandler.java @@ -1,23 +1,5 @@ package com.plotsquared.bukkit.util.bukkit.uuid; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.UUID; - -import org.bukkit.Bukkit; -import org.bukkit.OfflinePlayer; - import com.google.common.collect.HashBiMap; import com.intellectualcrafters.json.JSONObject; import com.intellectualcrafters.plot.PS; @@ -32,6 +14,17 @@ import com.intellectualcrafters.plot.util.UUIDHandler; import com.intellectualcrafters.plot.util.UUIDHandlerImplementation; import com.intellectualcrafters.plot.uuid.UUIDWrapper; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.*; + public class SQLUUIDHandler extends UUIDHandlerImplementation { public SQLUUIDHandler(UUIDWrapper wrapper) { diff --git a/src/main/java/com/intellectualsites/commands/Argument.java b/src/main/java/com/plotsquared/general/commands/Argument.java similarity index 98% rename from src/main/java/com/intellectualsites/commands/Argument.java rename to src/main/java/com/plotsquared/general/commands/Argument.java index 9a827ae9a..53313b038 100644 --- a/src/main/java/com/intellectualsites/commands/Argument.java +++ b/src/main/java/com/plotsquared/general/commands/Argument.java @@ -1,8 +1,8 @@ -package com.intellectualsites.commands; +package com.plotsquared.general.commands; import com.intellectualcrafters.plot.object.ConsolePlayer; -import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.util.MainUtil; public abstract class Argument { diff --git a/src/main/java/com/intellectualsites/commands/Command.java b/src/main/java/com/plotsquared/general/commands/Command.java similarity index 99% rename from src/main/java/com/intellectualsites/commands/Command.java rename to src/main/java/com/plotsquared/general/commands/Command.java index 691e9540d..159e5ebf9 100644 --- a/src/main/java/com/intellectualsites/commands/Command.java +++ b/src/main/java/com/plotsquared/general/commands/Command.java @@ -1,4 +1,7 @@ -package com.intellectualsites.commands; +package com.plotsquared.general.commands; + +import com.intellectualcrafters.plot.commands.CommandCategory; +import com.intellectualcrafters.plot.commands.RequiredType; import java.lang.annotation.Annotation; import java.util.ArrayList; @@ -6,9 +9,6 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Set; -import com.intellectualcrafters.plot.commands.CommandCategory; -import com.intellectualcrafters.plot.commands.RequiredType; - public abstract class Command extends CommandManager { private RequiredType requiredType = RequiredType.NONE; diff --git a/src/main/java/com/intellectualsites/commands/CommandCaller.java b/src/main/java/com/plotsquared/general/commands/CommandCaller.java similarity index 88% rename from src/main/java/com/intellectualsites/commands/CommandCaller.java rename to src/main/java/com/plotsquared/general/commands/CommandCaller.java index f150d9f8b..5358ff71c 100644 --- a/src/main/java/com/intellectualsites/commands/CommandCaller.java +++ b/src/main/java/com/plotsquared/general/commands/CommandCaller.java @@ -1,4 +1,4 @@ -package com.intellectualsites.commands; +package com.plotsquared.general.commands; import com.intellectualcrafters.plot.commands.RequiredType; import com.intellectualcrafters.plot.config.C; diff --git a/src/main/java/com/intellectualsites/commands/CommandDeclaration.java b/src/main/java/com/plotsquared/general/commands/CommandDeclaration.java similarity index 93% rename from src/main/java/com/intellectualsites/commands/CommandDeclaration.java rename to src/main/java/com/plotsquared/general/commands/CommandDeclaration.java index ffb87cc0b..1c2fe202a 100644 --- a/src/main/java/com/intellectualsites/commands/CommandDeclaration.java +++ b/src/main/java/com/plotsquared/general/commands/CommandDeclaration.java @@ -1,4 +1,4 @@ -package com.intellectualsites.commands; +package com.plotsquared.general.commands; import com.intellectualcrafters.plot.commands.CommandCategory; import com.intellectualcrafters.plot.commands.RequiredType; diff --git a/src/main/java/com/intellectualsites/commands/CommandHandlingOutput.java b/src/main/java/com/plotsquared/general/commands/CommandHandlingOutput.java similarity index 95% rename from src/main/java/com/intellectualsites/commands/CommandHandlingOutput.java rename to src/main/java/com/plotsquared/general/commands/CommandHandlingOutput.java index 424228ca1..10f9d1203 100644 --- a/src/main/java/com/intellectualsites/commands/CommandHandlingOutput.java +++ b/src/main/java/com/plotsquared/general/commands/CommandHandlingOutput.java @@ -1,4 +1,4 @@ -package com.intellectualsites.commands; +package com.plotsquared.general.commands; import java.lang.reflect.Field; diff --git a/src/main/java/com/intellectualsites/commands/CommandManager.java b/src/main/java/com/plotsquared/general/commands/CommandManager.java similarity index 93% rename from src/main/java/com/intellectualsites/commands/CommandManager.java rename to src/main/java/com/plotsquared/general/commands/CommandManager.java index e94b0e482..33c2381ea 100644 --- a/src/main/java/com/intellectualsites/commands/CommandManager.java +++ b/src/main/java/com/plotsquared/general/commands/CommandManager.java @@ -1,19 +1,13 @@ -package com.intellectualsites.commands; +package com.plotsquared.general.commands; + +import com.intellectualcrafters.plot.config.C; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; -import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.commands.RequiredType; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.object.ConsolePlayer; -import com.intellectualcrafters.plot.util.MainUtil; - @SuppressWarnings("unused") public class CommandManager { diff --git a/src/main/java/com/plotsquared/sponge/PlotGen.java b/src/main/java/com/plotsquared/sponge/PlotGen.java index b3dbf99a9..65d7a6f27 100644 --- a/src/main/java/com/plotsquared/sponge/PlotGen.java +++ b/src/main/java/com/plotsquared/sponge/PlotGen.java @@ -1,5 +1,6 @@ package com.plotsquared.sponge; +import com.flowpowered.math.vector.Vector3i; import org.spongepowered.api.block.BlockState; import org.spongepowered.api.block.BlockTypes; import org.spongepowered.api.world.World; @@ -7,8 +8,6 @@ import org.spongepowered.api.world.extent.ImmutableBiomeArea; import org.spongepowered.api.world.extent.MutableBlockVolume; import org.spongepowered.api.world.gen.GeneratorPopulator; -import com.flowpowered.math.vector.Vector3i; - public class PlotGen implements GeneratorPopulator { public String worldname; diff --git a/src/main/java/com/plotsquared/sponge/SpongeGeneratorWrapper.java b/src/main/java/com/plotsquared/sponge/SpongeGeneratorWrapper.java index b907aee1b..706f9e354 100644 --- a/src/main/java/com/plotsquared/sponge/SpongeGeneratorWrapper.java +++ b/src/main/java/com/plotsquared/sponge/SpongeGeneratorWrapper.java @@ -1,11 +1,10 @@ package com.plotsquared.sponge; -import org.spongepowered.api.world.gen.WorldGenerator; - import com.intellectualcrafters.plot.generator.PlotGenerator; import com.intellectualcrafters.plot.object.PlotCluster; import com.intellectualcrafters.plot.object.PlotManager; import com.intellectualcrafters.plot.object.PlotWorld; +import org.spongepowered.api.world.gen.WorldGenerator; public class SpongeGeneratorWrapper extends PlotGenerator{ diff --git a/src/main/java/com/plotsquared/sponge/SpongeMain.java b/src/main/java/com/plotsquared/sponge/SpongeMain.java index 01f671fff..cb02abba3 100644 --- a/src/main/java/com/plotsquared/sponge/SpongeMain.java +++ b/src/main/java/com/plotsquared/sponge/SpongeMain.java @@ -1,9 +1,16 @@ package com.plotsquared.sponge; -import java.io.File; -import java.util.Collection; -import java.util.UUID; - +import com.google.inject.Inject; +import com.intellectualcrafters.configuration.ConfigurationSection; +import com.intellectualcrafters.plot.IPlotMain; +import com.intellectualcrafters.plot.PS; +import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.config.Settings; +import com.intellectualcrafters.plot.generator.HybridUtils; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.*; +import com.plotsquared.bukkit.listeners.APlotListener; +import com.plotsquared.bukkit.util.SetupUtils; import org.slf4j.Logger; import org.spongepowered.api.Game; import org.spongepowered.api.Server; @@ -19,27 +26,9 @@ import org.spongepowered.api.world.DimensionTypes; import org.spongepowered.api.world.GeneratorTypes; import org.spongepowered.api.world.World; -import com.google.inject.Inject; -import com.intellectualcrafters.configuration.ConfigurationSection; -import com.intellectualcrafters.plot.IPlotMain; -import com.intellectualcrafters.plot.PS; -import com.intellectualcrafters.plot.config.C; -import com.intellectualcrafters.plot.config.Settings; -import com.intellectualcrafters.plot.generator.HybridUtils; -import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.BlockManager; -import com.intellectualcrafters.plot.util.ChunkManager; -import com.intellectualcrafters.plot.util.ConsoleColors; -import com.intellectualcrafters.plot.util.EconHandler; -import com.intellectualcrafters.plot.util.EventUtil; -import com.intellectualcrafters.plot.util.InventoryUtil; -import com.intellectualcrafters.plot.util.PlayerManager; -import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualcrafters.plot.util.UUIDHandler; -import com.intellectualcrafters.plot.util.UUIDHandlerImplementation; -import com.intellectualcrafters.plot.uuid.UUIDWrapper; -import com.plotsquared.bukkit.listeners.APlotListener; -import com.plotsquared.bukkit.util.SetupUtils; +import java.io.File; +import java.util.Collection; +import java.util.UUID; /** * Created by robin on 01/11/2014 diff --git a/src/main/java/com/plotsquared/sponge/SpongeMetrics.java b/src/main/java/com/plotsquared/sponge/SpongeMetrics.java index a3f103122..980f64ebd 100644 --- a/src/main/java/com/plotsquared/sponge/SpongeMetrics.java +++ b/src/main/java/com/plotsquared/sponge/SpongeMetrics.java @@ -31,21 +31,13 @@ package com.plotsquared.sponge; import ninja.leaping.configurate.commented.CommentedConfigurationNode; import ninja.leaping.configurate.hocon.HoconConfigurationLoader; import ninja.leaping.configurate.loader.ConfigurationLoader; - import org.spongepowered.api.Game; import org.spongepowered.api.plugin.PluginContainer; import org.spongepowered.api.service.scheduler.Task; import org.spongepowered.api.service.scheduler.TaskBuilder; import javax.inject.Inject; - -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.io.*; import java.net.Proxy; import java.net.URL; import java.net.URLConnection; diff --git a/src/main/java/com/plotsquared/sponge/SpongePlotGenerator.java b/src/main/java/com/plotsquared/sponge/SpongePlotGenerator.java index 6563da59e..8c27f1209 100644 --- a/src/main/java/com/plotsquared/sponge/SpongePlotGenerator.java +++ b/src/main/java/com/plotsquared/sponge/SpongePlotGenerator.java @@ -1,18 +1,11 @@ package com.plotsquared.sponge; -import java.util.List; - -import org.bukkit.World; import org.spongepowered.api.world.gen.BiomeGenerator; import org.spongepowered.api.world.gen.GeneratorPopulator; import org.spongepowered.api.world.gen.Populator; import org.spongepowered.api.world.gen.WorldGenerator; -import com.intellectualcrafters.plot.object.PlotManager; -import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.object.PseudoRandom; -import com.intellectualcrafters.plot.object.RegionWrapper; -import com.plotsquared.bukkit.object.PlotPopulator; +import java.util.List; public class SpongePlotGenerator implements WorldGenerator {