diff --git a/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java b/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java index 390f0be9e..0eae2af7b 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java @@ -684,7 +684,6 @@ public class PlotMain extends JavaPlugin { //Setup version + downloads, will not be updated... maybe setup runnable? TODO Let jesse decide... com.intellectualcrafters.plot.commands.plugin.setup(this); - // TODO Test... UUIDHandler.startFetch(this); } diff --git a/PlotSquared/src/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/PlotSquared/src/com/intellectualcrafters/plot/listeners/PlayerEvents.java index 8fe3dff7f..2b9964596 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -8,17 +8,10 @@ package com.intellectualcrafters.plot.listeners; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Set; -import java.util.UUID; - -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.World; +import com.intellectualcrafters.plot.*; +import com.intellectualcrafters.plot.events.PlayerEnterPlotEvent; +import com.intellectualcrafters.plot.events.PlayerLeavePlotEvent; +import org.bukkit.*; import org.bukkit.block.Biome; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -29,18 +22,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.block.BlockBreakEvent; -import org.bukkit.event.block.BlockDamageEvent; -import org.bukkit.event.block.BlockFadeEvent; -import org.bukkit.event.block.BlockFormEvent; -import org.bukkit.event.block.BlockFromToEvent; -import org.bukkit.event.block.BlockGrowEvent; -import org.bukkit.event.block.BlockIgniteEvent; -import org.bukkit.event.block.BlockPistonExtendEvent; -import org.bukkit.event.block.BlockPistonRetractEvent; -import org.bukkit.event.block.BlockPlaceEvent; -import org.bukkit.event.block.BlockSpreadEvent; -import org.bukkit.event.block.EntityBlockFormEvent; +import org.bukkit.event.block.*; import org.bukkit.event.entity.CreatureSpawnEvent; import org.bukkit.event.entity.EntityChangeBlockEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent; @@ -48,29 +30,14 @@ import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; import org.bukkit.event.hanging.HangingPlaceEvent; import org.bukkit.event.inventory.InventoryClickEvent; -import org.bukkit.event.player.AsyncPlayerChatEvent; -import org.bukkit.event.player.PlayerBucketEmptyEvent; -import org.bukkit.event.player.PlayerBucketFillEvent; -import org.bukkit.event.player.PlayerChangedWorldEvent; -import org.bukkit.event.player.PlayerEggThrowEvent; -import org.bukkit.event.player.PlayerInteractEntityEvent; -import org.bukkit.event.player.PlayerInteractEvent; -import org.bukkit.event.player.PlayerJoinEvent; -import org.bukkit.event.player.PlayerMoveEvent; -import org.bukkit.event.player.PlayerTeleportEvent; +import org.bukkit.event.player.*; import org.bukkit.event.world.StructureGrowEvent; import org.bukkit.event.world.WorldLoadEvent; -import com.intellectualcrafters.plot.C; -import com.intellectualcrafters.plot.PlayerFunctions; -import com.intellectualcrafters.plot.Plot; -import com.intellectualcrafters.plot.PlotId; -import com.intellectualcrafters.plot.PlotMain; -import com.intellectualcrafters.plot.PlotWorld; -import com.intellectualcrafters.plot.Settings; -import com.intellectualcrafters.plot.Title; -import com.intellectualcrafters.plot.events.PlayerEnterPlotEvent; -import com.intellectualcrafters.plot.events.PlayerLeavePlotEvent; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.UUID; /** * Player Events involving plots @@ -81,12 +48,8 @@ import com.intellectualcrafters.plot.events.PlayerLeavePlotEvent; public class PlayerEvents implements Listener { private String getName(UUID uuid) { - String player = Bukkit.getOfflinePlayer(uuid).getName(); - if (player != null) { - return player; - } - return "unknown"; - } + return UUIDHandler.getName(uuid); + } public boolean enteredPlot(Location l1, Location l2) { PlotId p1 = PlayerFunctions.getPlot(new Location(l1.getWorld(), l1.getBlockX(), 64, l1.getBlockZ()));