From b904cdd51bc85ca2cb4a6f15be3c5e392f9b934a Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sat, 21 Feb 2015 22:38:44 +1100 Subject: [PATCH] AUto --- .../intellectualcrafters/plot/BukkitMain.java | 1 - .../intellectualcrafters/plot/IPlotMain.java | 1 - .../plot/commands/Auto.java | 27 ++++++++----------- .../plot/commands/Ban.java | 4 +-- .../plot/commands/BukkitCommand.java | 1 - .../plot/commands/Buy.java | 4 +-- .../plot/commands/Claim.java | 8 +++--- .../plot/commands/Clear.java | 3 +-- .../plot/commands/Clipboard.java | 5 ++-- .../plot/commands/Cluster.java | 3 +-- .../plot/commands/CommandPermission.java | 1 - .../plot/commands/Comment.java | 3 +-- .../plot/commands/Condense.java | 3 +-- .../plot/commands/Copy.java | 4 +-- .../plot/commands/CreateRoadSchematic.java | 3 +-- .../plot/commands/DEOP.java | 4 +-- .../plot/commands/Database.java | 3 ++- .../plot/commands/Debug.java | 3 +-- .../plot/commands/DebugClaimTest.java | 1 + .../plot/commands/DebugClear.java | 3 +-- .../plot/commands/DebugExec.java | 4 +-- .../plot/commands/DebugFixFlags.java | 4 +-- .../plot/commands/DebugLoadTest.java | 5 ++-- .../plot/commands/DebugRoadRegen.java | 4 +-- .../plot/commands/DebugSaveTest.java | 5 ++-- .../plot/commands/Delete.java | 5 ++-- .../plot/commands/Denied.java | 3 ++- .../plot/commands/FlagCmd.java | 4 +-- .../plot/commands/Help.java | 2 +- .../plot/commands/Helpers.java | 4 +-- .../plot/commands/Home.java | 3 ++- .../plot/commands/Inbox.java | 4 +-- .../plot/commands/Info.java | 1 + .../plot/commands/Inventory.java | 3 ++- .../plot/commands/Kick.java | 3 ++- .../plot/commands/MainCommand.java | 2 -- .../plot/commands/Merge.java | 3 +-- .../plot/commands/Move.java | 3 +-- .../plot/commands/MusicSubcommand.java | 2 +- .../plot/commands/OP.java | 4 +-- .../plot/commands/Paste.java | 4 +-- .../plot/commands/Purge.java | 4 +-- .../plot/commands/Rate.java | 3 +-- .../plot/commands/RegenAllRoads.java | 2 +- .../plot/commands/Reload.java | 4 +-- .../plot/commands/Schematic.java | 3 +-- .../plot/commands/Set.java | 3 +-- .../plot/commands/SetOwner.java | 3 +-- .../plot/commands/Setup.java | 4 +-- .../plot/commands/SubCommand.java | 1 - .../plot/commands/Swap.java | 3 +-- .../plot/commands/TP.java | 2 +- .../plot/commands/Target.java | 3 +-- .../plot/commands/Template.java | 4 +-- .../plot/commands/Trim.java | 3 +-- .../plot/commands/Trusted.java | 4 +-- .../plot/commands/Unban.java | 4 +-- .../plot/commands/Unclaim.java | 4 +-- .../plot/commands/Unlink.java | 2 +- .../plot/commands/Visit.java | 3 +-- .../plot/commands/WE_Anywhere.java | 5 +--- .../plot/commands/list.java | 4 +-- .../plot/commands/plugin.java | 4 +-- .../plot/listeners/PlayerEvents.java | 2 -- .../plot/listeners/PlotPlusListener.java | 2 -- .../plot/listeners/WorldEditListener.java | 2 -- .../plot/object/BukkitPlayer.java | 11 +++----- .../plot/util/MainUtil.java | 24 +++++++++++++++-- .../util/bukkit/BukkitPlayerFunctions.java | 18 ------------- 69 files changed, 121 insertions(+), 167 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java index 00a0e3a88..fee316dac 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java @@ -37,7 +37,6 @@ import com.intellectualcrafters.plot.listeners.PlayerEvents_1_8; import com.intellectualcrafters.plot.listeners.PlotPlusListener; import com.intellectualcrafters.plot.listeners.WorldEditListener; import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.ConsoleColors; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.TaskManager; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/IPlotMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/IPlotMain.java index b00d4acad..dba352914 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/IPlotMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/IPlotMain.java @@ -5,7 +5,6 @@ import java.io.File; import net.milkbowl.vault.economy.Economy; import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.TaskManager; public interface IPlotMain { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java index ec9a4c593..4f0280435 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java @@ -22,15 +22,10 @@ package com.intellectualcrafters.plot.commands; import net.milkbowl.vault.economy.Economy; -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.World; -import org.bukkit.entity.Player; - -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; 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; @@ -38,8 +33,7 @@ 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.bukkit.BukkitPlayerFunctions; -import com.intellectualcrafters.plot.util.bukkit.BukkitUtil; +import com.intellectualcrafters.plot.util.Permissions; public class Auto extends SubCommand { public Auto() { @@ -124,7 +118,8 @@ public class Auto extends SubCommand { MainUtil.sendMessage(plr, C.CANT_CLAIM_MORE_PLOTS_NUM, Settings.MAX_AUTO_SIZE + ""); return false; } - final int diff = BukkitPlayerFunctions.getPlayerPlotCount(world, plr) - BukkitPlayerFunctions.getAllowedPlots(plr); + int currentPlots = MainUtil.getPlayerPlotCount(world, plr); + final int diff = currentPlots - MainUtil.getAllowedPlots(plr, currentPlots); if ((diff + (size_x * size_z)) > 0) { if (diff < 0) { MainUtil.sendMessage(plr, C.CANT_CLAIM_MORE_PLOTS_NUM, (-diff) + ""); @@ -133,17 +128,17 @@ public class Auto extends SubCommand { } return false; } - final PlotWorld pWorld = PlotSquared.getPlotWorld(world.getName()); + final PlotWorld pWorld = PlotSquared.getPlotWorld(world); if ((PlotSquared.economy != null) && pWorld.USE_ECONOMY) { double cost = pWorld.PLOT_PRICE; cost = (size_x * size_z) * cost; if (cost > 0d) { final Economy economy = PlotSquared.economy; - if (economy.getBalance(plr) < cost) { + if (economy.getBalance(plr.getName()) < cost) { sendMessage(plr, C.CANNOT_AFFORD_PLOT, "" + cost); return true; } - economy.withdrawPlayer(plr, cost); + economy.withdrawPlayer(plr.getName(), cost); sendMessage(plr, C.REMOVED_BALANCE, cost + ""); } } @@ -159,11 +154,11 @@ public class Auto extends SubCommand { } // } } - final String worldname = world.getName(); + final String worldname = world; final PlotWorld plotworld = PlotSquared.getPlotWorld(worldname); if (plotworld.TYPE == 2) { - final Location loc = BukkitUtil.getLocation(plr); - final Plot plot = MainUtil.getCurrentPlot(new com.intellectualcrafters.plot.object.Location(worldname, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); + final Location loc = plr.getLocation(); + final Plot plot = MainUtil.getPlot(new Location(worldname, loc.getX(), loc.getY(), loc.getZ())); if (plot == null) { return sendMessage(plr, C.NOT_IN_PLOT); } @@ -225,7 +220,7 @@ public class Auto extends SubCommand { Claim.claimPlot(plr, plot, teleport, true); } } - if (!MainUtil.mergePlots(plr, worldname, BukkitPlayerFunctions.getPlotSelectionIds(start, end))) { + if (!MainUtil.mergePlots(worldname, MainUtil.getPlotSelectionIds(start, end), true)) { return false; } br = true; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java index 4a3486b5b..9f7d93a7e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java @@ -1,9 +1,9 @@ package com.intellectualcrafters.plot.commands; -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; /** diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/BukkitCommand.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/BukkitCommand.java index e6e435896..852bfeaa2 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/BukkitCommand.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/BukkitCommand.java @@ -7,7 +7,6 @@ import java.util.List; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; -import org.bukkit.command.TabCommandExecutor; import org.bukkit.command.TabCompleter; import org.bukkit.entity.Player; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Buy.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Buy.java index d474eacd2..ec0db781d 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Buy.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Buy.java @@ -22,9 +22,6 @@ package com.intellectualcrafters.plot.commands; import net.milkbowl.vault.economy.Economy; -import org.bukkit.World; -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -32,6 +29,7 @@ import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java index 15ed083de..baa6c6712 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java @@ -23,14 +23,12 @@ package com.intellectualcrafters.plot.commands; import net.milkbowl.vault.economy.Economy; import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.events.PlayerClaimPlotEvent; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.SchematicHandler; @@ -44,11 +42,11 @@ public class Claim extends SubCommand { super(Command.CLAIM, "Claim the current plot you're standing on.", "claim", CommandCategory.CLAIMING, true); } - public static boolean claimPlot(final Player player, final Plot plot, final boolean teleport, final boolean auto) { + public static boolean claimPlot(final PlotPlayer player, final Plot plot, final boolean teleport, final boolean auto) { return claimPlot(player, plot, teleport, "", auto); } - public static boolean claimPlot(final Player player, final Plot plot, final boolean teleport, final String schematic, final boolean auto) { + public static boolean claimPlot(final PlotPlayer player, final Plot plot, final boolean teleport, final String schematic, final boolean auto) { if (plot.hasOwner() || plot.settings.isMerged()) { return false; } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clear.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clear.java index e259a8517..5462e624e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clear.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clear.java @@ -21,13 +21,12 @@ package com.intellectualcrafters.plot.commands; import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; 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.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clipboard.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clipboard.java index 1db72f37d..8768a627b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clipboard.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clipboard.java @@ -20,11 +20,10 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.PlotId; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; public class Clipboard extends SubCommand { public Clipboard() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java index 259f546e8..144e63cd8 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java @@ -29,7 +29,6 @@ import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.generator.BlockPopulator; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -39,10 +38,10 @@ 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.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; public class Cluster extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CommandPermission.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CommandPermission.java index 17329e82f..5bc566019 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CommandPermission.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CommandPermission.java @@ -20,7 +20,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.Permissions; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Comment.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Comment.java index bbf31876c..25d876563 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Comment.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Comment.java @@ -24,13 +24,12 @@ import java.util.Arrays; import java.util.List; import org.apache.commons.lang.StringUtils; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotComment; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; public class Comment extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Condense.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Condense.java index 14b37aa94..506b6cd28 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Condense.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Condense.java @@ -29,14 +29,13 @@ import java.util.Set; import org.apache.commons.lang.StringUtils; import org.bukkit.Bukkit; import org.bukkit.World; -import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotSquared; 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.MainUtil; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; public class Condense extends SubCommand { public static boolean TASK = false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java index f80941c19..a800e0002 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java @@ -20,11 +20,9 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import org.bukkit.entity.Player; - -import com.intellectualcrafters.plot.BukkitMain; 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.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java index 2c52265ca..5577f5b7e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java @@ -20,13 +20,12 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.generator.HybridPlotManager; import com.intellectualcrafters.plot.generator.HybridPlotWorld; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DEOP.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DEOP.java index 0e73c7b85..e79c15abf 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DEOP.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DEOP.java @@ -1,9 +1,9 @@ package com.intellectualcrafters.plot.commands; -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; /** diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Database.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Database.java index 888fe4824..3ffbd9f09 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Database.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Database.java @@ -13,9 +13,10 @@ import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.database.MySQL; import com.intellectualcrafters.plot.database.SQLManager; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.StringComparison; import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; /** diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java index f1ebda2bf..54ae8c264 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java @@ -22,14 +22,13 @@ package com.intellectualcrafters.plot.commands; import org.bukkit.Bukkit; import org.bukkit.World; -import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotSquared; 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.intellectualcrafters.plot.util.RUtils; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; public class Debug extends SubCommand { public Debug() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java index 8ade9b77b..3afb20e24 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java @@ -39,6 +39,7 @@ import com.intellectualcrafters.plot.events.PlayerClaimPlotEvent; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotManager; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.object.StringWrapper; import com.intellectualcrafters.plot.util.MainUtil; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java index 9501f06b1..2c6506e87 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java @@ -23,14 +23,13 @@ package com.intellectualcrafters.plot.commands; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.generator.SquarePlotWorld; 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.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.ChunkManager; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java index f92a01ffa..f0729e205 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java @@ -35,13 +35,13 @@ import org.apache.commons.lang.StringUtils; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.World; -import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.object.ChunkLoc; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.ExpireManager; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; public class DebugExec extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugFixFlags.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugFixFlags.java index 59cd7a75d..ed770bd18 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugFixFlags.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugFixFlags.java @@ -25,7 +25,6 @@ import java.util.Set; import org.bukkit.Bukkit; import org.bukkit.World; -import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; @@ -34,7 +33,8 @@ import com.intellectualcrafters.plot.flag.AbstractFlag; import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; public class DebugFixFlags extends SubCommand { public DebugFixFlags() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java index 36aa892b2..3edf91893 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java @@ -22,11 +22,10 @@ package com.intellectualcrafters.plot.commands; import java.lang.reflect.Field; -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.database.DBFunc; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; /** * @author Citymonstret diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java index 2085f7702..e08655e7c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java @@ -23,13 +23,13 @@ package com.intellectualcrafters.plot.commands; import java.util.Arrays; import org.bukkit.Chunk; -import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.generator.HybridPlotManager; import com.intellectualcrafters.plot.generator.HybridPlotWorld; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.SetBlockManager; public class DebugRoadRegen extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java index 797532c52..3391feb85 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java @@ -22,12 +22,11 @@ package com.intellectualcrafters.plot.commands; import java.util.ArrayList; -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; /** * @author Citymonstret diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Delete.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Delete.java index 4d8ff392c..b198851e2 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Delete.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Delete.java @@ -22,14 +22,13 @@ package com.intellectualcrafters.plot.commands; import net.milkbowl.vault.economy.Economy; -import org.bukkit.entity.Player; - -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java index 6557770da..2afce81f4 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java @@ -25,11 +25,12 @@ import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.events.PlayerPlotDeniedEvent; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java index a67c73fe0..6565b6b8f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java @@ -25,9 +25,7 @@ import java.util.Arrays; import java.util.HashMap; import org.apache.commons.lang.StringUtils; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.flag.AbstractFlag; @@ -36,6 +34,8 @@ import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.flag.FlagValue; import com.intellectualcrafters.plot.listeners.PlotListener; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; public class FlagCmd extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Help.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Help.java index 1f6879a41..978afa09b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Help.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Help.java @@ -7,7 +7,7 @@ */ package com.intellectualcrafters.plot.commands; -import org.bukkit.entity.Player; +import com.intellectualcrafters.plot.object.PlotPlayer; public class Help extends SubCommand { public Help() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java index 06462e1ca..c82ab5e19 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java @@ -23,13 +23,13 @@ package com.intellectualcrafters.plot.commands; import java.util.UUID; import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.events.PlayerPlotHelperEvent; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java index 5e377e0a9..3aaf74b5c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java @@ -25,7 +25,8 @@ import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; /** diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java index 5b9eb91fd..0919f5f99 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java @@ -26,14 +26,14 @@ import java.util.List; import java.util.UUID; import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotComment; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java index 483e1d1ca..ee8de8f56 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java @@ -37,6 +37,7 @@ import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.object.InfoInventory; 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.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inventory.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inventory.java index 21bde1b6a..e816e5e14 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inventory.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inventory.java @@ -25,10 +25,11 @@ import java.util.ArrayList; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; -import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; +import com.intellectualcrafters.plot.object.PlotPlayer; + public class Inventory extends SubCommand { public Inventory() { super("inventory", "plots.inventory", "Open a command inventory", "inventory", "inv", CommandCategory.INFO, true); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java index 1538a4682..5db8c76aa 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java @@ -23,9 +23,10 @@ package com.intellectualcrafters.plot.commands; import org.bukkit.Bukkit; import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; 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.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java index c40b3a3b2..70abef5fb 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java @@ -24,14 +24,12 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.StringComparison; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; /** * PlotSquared command class diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Merge.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Merge.java index 338f8d925..e8311c8ae 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Merge.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Merge.java @@ -27,14 +27,13 @@ import net.milkbowl.vault.economy.Economy; import org.apache.commons.lang.StringUtils; import org.bukkit.Bukkit; import org.bukkit.World; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.events.PlotMergeEvent; 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.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Move.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Move.java index f934ae66c..e7b76d167 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Move.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Move.java @@ -21,11 +21,10 @@ package com.intellectualcrafters.plot.commands; import org.bukkit.World; -import org.bukkit.entity.Player; import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; /** * Created 2014-08-01 for PlotSquared diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java index eb16571f5..8cc68c9fe 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java @@ -24,13 +24,13 @@ import java.util.Arrays; import org.bukkit.Bukkit; import org.bukkit.ChatColor; -import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.listeners.PlotPlusListener; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; public class MusicSubcommand extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/OP.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/OP.java index 98808c3f9..b953d97bd 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/OP.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/OP.java @@ -1,9 +1,9 @@ package com.intellectualcrafters.plot.commands; -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; /** diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Paste.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Paste.java index a1a5b0d45..2ad66e890 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Paste.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Paste.java @@ -20,11 +20,9 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import org.bukkit.entity.Player; - -import com.intellectualcrafters.plot.BukkitMain; 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.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java index d10d6da63..50057bc14 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java @@ -27,14 +27,14 @@ import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.World; -import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotSquared; 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.util.bukkit.BukkitPlayerFunctions; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; @SuppressWarnings({ "javadoc" }) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Rate.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Rate.java index eeed3d23f..59f3e21d8 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Rate.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Rate.java @@ -20,11 +20,10 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java index 8dfade597..f482ab200 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java @@ -24,13 +24,13 @@ import java.util.ArrayList; import org.bukkit.Bukkit; import org.bukkit.World; -import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.generator.HybridPlotManager; import com.intellectualcrafters.plot.object.ChunkLoc; import com.intellectualcrafters.plot.object.PlotManager; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.bukkit.ChunkManager; public class RegenAllRoads extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java index 8cb995e33..22ef1b96c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java @@ -20,13 +20,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; public class Reload extends SubCommand { public Reload() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Schematic.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Schematic.java index 1c6b2c3e6..6563a38ea 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Schematic.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Schematic.java @@ -26,16 +26,15 @@ import java.util.HashMap; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; -import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; import com.intellectualcrafters.jnbt.CompoundTag; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.SchematicHandler; import com.intellectualcrafters.plot.util.SchematicHandler.DataCollection; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java index db9a20f61..191e62968 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java @@ -29,9 +29,7 @@ import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; import org.bukkit.block.Biome; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Configuration; @@ -44,6 +42,7 @@ import com.intellectualcrafters.plot.object.BlockLoc; 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.MainUtil; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java index bb5a39748..0b999315b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java @@ -24,14 +24,13 @@ import java.util.ArrayList; import java.util.UUID; import org.bukkit.World; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; 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.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Setup.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Setup.java index 7ec97a7ee..47c439242 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Setup.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Setup.java @@ -31,7 +31,6 @@ import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.World.Environment; import org.bukkit.WorldCreator; -import org.bukkit.entity.Player; import org.bukkit.generator.ChunkGenerator; import org.bukkit.plugin.Plugin; @@ -41,7 +40,8 @@ import com.intellectualcrafters.plot.config.ConfigurationNode; import com.intellectualcrafters.plot.config.Settings; import com.intellectualcrafters.plot.generator.SquarePlotManager; import com.intellectualcrafters.plot.object.PlotGenerator; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; public class Setup extends SubCommand { public final static Map setupMap = new HashMap<>(); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SubCommand.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SubCommand.java index f2b83b4dc..f5ca65fe3 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SubCommand.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SubCommand.java @@ -26,7 +26,6 @@ import java.util.Arrays; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; /** * SubCommand class diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Swap.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Swap.java index 7d7b2d500..b2435bce1 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Swap.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Swap.java @@ -21,14 +21,13 @@ package com.intellectualcrafters.plot.commands; import org.bukkit.World; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; 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.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/TP.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/TP.java index 4a2ca07c0..097d61e50 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/TP.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/TP.java @@ -29,8 +29,8 @@ import com.intellectualcrafters.plot.PlotSquared; 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.MainUtil; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; /** * @author Citymonstret diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Target.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Target.java index 9efb7ff59..a0c676b44 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Target.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Target.java @@ -21,13 +21,12 @@ package com.intellectualcrafters.plot.commands; import org.bukkit.Location; -import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.MainUtil; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; public class Target extends SubCommand { public Target() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Template.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Template.java index e33c84e16..3c408382d 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Template.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Template.java @@ -27,12 +27,12 @@ import java.util.zip.GZIPOutputStream; import org.bukkit.Bukkit; import org.bukkit.World; -import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotWorld; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; +import com.intellectualcrafters.plot.util.MainUtil; public class Template extends SubCommand { public Template() { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trim.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trim.java index c1221f633..509143a05 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trim.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trim.java @@ -31,16 +31,15 @@ import java.util.HashSet; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; -import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.ChunkLoc; 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.TaskManager; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.ChunkManager; public class Trim extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java index 5e6015e85..5dff8fe4e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java @@ -23,13 +23,13 @@ package com.intellectualcrafters.plot.commands; import java.util.UUID; import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.events.PlayerPlotTrustedEvent; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unban.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unban.java index 0b3d11c39..8da5ab61f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unban.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unban.java @@ -1,9 +1,9 @@ package com.intellectualcrafters.plot.commands; -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; /** diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java index 2f5dac440..54490d600 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java @@ -23,14 +23,14 @@ package com.intellectualcrafters.plot.commands; import net.milkbowl.vault.economy.Economy; import org.bukkit.World; -import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotWorld; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java index 4ca93039a..452426514 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java @@ -26,7 +26,6 @@ import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.entity.Player; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.database.DBFunc; @@ -34,6 +33,7 @@ import com.intellectualcrafters.plot.events.PlotUnlinkEvent; 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.MainUtil; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java index ab06001db..2d997d34e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java @@ -24,11 +24,10 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; -import org.bukkit.entity.Player; - import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; public class Visit extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java index 778587e36..69cd4fbd9 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java @@ -20,12 +20,9 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// package com.intellectualcrafters.plot.commands; -import org.bukkit.entity.Player; - -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.object.PlotPlayer; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.bukkit.PWE; public class WE_Anywhere extends SubCommand { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java index dc430cf71..5d8981f90 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java @@ -24,7 +24,6 @@ import java.util.HashMap; import java.util.UUID; import org.bukkit.ChatColor; -import org.bukkit.entity.Player; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; @@ -32,8 +31,9 @@ import com.intellectualcrafters.plot.flag.Flag; import com.intellectualcrafters.plot.flag.FlagManager; import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotId; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.StringComparison; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; /** diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java index ea9a73018..fad1bb18e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java @@ -27,11 +27,11 @@ import java.net.URLConnection; import java.util.ArrayList; import org.bukkit.Bukkit; -import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import com.intellectualcrafters.plot.PlotSquared; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; +import com.intellectualcrafters.plot.object.PlotPlayer; +import com.intellectualcrafters.plot.util.MainUtil; public class plugin extends SubCommand { public static String downloads, version; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java index abb5739a1..4488f27b1 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -83,7 +83,6 @@ import org.bukkit.event.world.StructureGrowEvent; import org.bukkit.event.world.WorldInitEvent; import org.bukkit.generator.ChunkGenerator; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.commands.Setup; import com.intellectualcrafters.plot.config.C; @@ -103,7 +102,6 @@ import com.intellectualcrafters.plot.object.StringWrapper; import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.TaskManager; -import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.BukkitUtil; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotPlusListener.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotPlusListener.java index 3f78b6433..66d243986 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotPlusListener.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotPlusListener.java @@ -46,7 +46,6 @@ import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.plugin.java.JavaPlugin; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.events.PlayerEnterPlotEvent; import com.intellectualcrafters.plot.events.PlayerLeavePlotEvent; @@ -55,7 +54,6 @@ 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.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.BukkitUtil; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/WorldEditListener.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/WorldEditListener.java index 034cad330..3cbe411b4 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/WorldEditListener.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/WorldEditListener.java @@ -39,7 +39,6 @@ import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerPortalEvent; import org.bukkit.event.player.PlayerTeleportEvent; -import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; @@ -50,7 +49,6 @@ 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.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.BukkitUtil; import com.intellectualcrafters.plot.util.bukkit.PWE; import com.intellectualcrafters.plot.util.bukkit.UUIDHandler; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BukkitPlayer.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BukkitPlayer.java index f07945649..5d494de28 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BukkitPlayer.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/BukkitPlayer.java @@ -17,13 +17,10 @@ public class BukkitPlayer implements PlotPlayer { private HashSet noPerm; private int op = 0; - - public BukkitPlayer(Player player, String name, UUID uuid) { - this.player = player; - this.name = name; - this.uuid = uuid; - } - + /** + * Please do not use this method. Instead use BukkitUtil.getPlayer(Player), as it caches player objects. + * @param player + */ public BukkitPlayer(Player player) { this.player = player; } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java index 6cc38eecc..5743f110b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java @@ -54,6 +54,24 @@ public class MainUtil { public static HashMap lastPlot = new HashMap<>(); public static HashMap worldBorder = new HashMap<>(); + /** + * Get the number of plots for a player + * + * @param plr + * + * @return + */ + public static int getPlayerPlotCount(final String world, final PlotPlayer plr) { + final UUID uuid = plr.getUUID(); + int count = 0; + for (final Plot plot : PlotSquared.getPlots(world).values()) { + if (plot.hasOwner() && plot.owner.equals(uuid) && plot.countsTowardsMax) { + count++; + } + } + return count; + } + public static boolean teleportPlayer(final PlotPlayer player, final Location from, final Plot plot) { final Plot bot = MainUtil.getBottomPlot(plot); @@ -189,8 +207,10 @@ public class MainUtil { final PlotId pos2 = plotIds.get(plotIds.size() - 1); final PlotManager manager = PlotSquared.getPlotManager(world); final PlotWorld plotworld = PlotSquared.getPlotWorld(world); + + // FIXME call event + manager.startPlotMerge(plotworld, plotIds); - final boolean result = false; for (int x = pos1.x; x <= pos2.x; x++) { for (int y = pos1.y; y <= pos2.y; y++) { final boolean lx = x < pos2.x; @@ -234,7 +254,7 @@ public class MainUtil { } } manager.finishPlotMerge(plotworld, plotIds); - return result; + return true; } /** diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/BukkitPlayerFunctions.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/BukkitPlayerFunctions.java index 1b9d6b4a5..24641c2cd 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/BukkitPlayerFunctions.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/BukkitPlayerFunctions.java @@ -169,22 +169,4 @@ public class BukkitPlayerFunctions { } return p; } - - /** - * Get the number of plots for a player - * - * @param plr - * - * @return - */ - public static int getPlayerPlotCount(final String world, final Player plr) { - final UUID uuid = UUIDHandler.getUUID(plr); - int count = 0; - for (final Plot plot : PlotSquared.getPlots(world).values()) { - if (plot.hasOwner() && plot.owner.equals(uuid) && plot.countsTowardsMax) { - count++; - } - } - return count; - } }