diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/DefaultUUIDWrapper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/DefaultUUIDWrapper.java deleted file mode 100644 index ff538103f..000000000 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/DefaultUUIDWrapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.intellectualcrafters.plot.util; - -import java.util.UUID; - -import org.bukkit.Bukkit; -import org.bukkit.OfflinePlayer; -import org.bukkit.entity.Player; - -public class DefaultUUIDWrapper extends UUIDWrapper { - - @Override - public UUID getUUID(Player player) { - return player.getUniqueId(); - } - - @Override - public UUID getUUID(OfflinePlayer player) { - return player.getUniqueId(); - } - - @Override - public OfflinePlayer getOfflinePlayer(UUID uuid) { - return Bukkit.getOfflinePlayer(uuid); - } - - @Override - public Player getPlayer(UUID uuid) { - return Bukkit.getPlayer(uuid); - } - -} diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/OfflineUUIDWrapper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/OfflineUUIDWrapper.java deleted file mode 100644 index fbf1e39e3..000000000 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/OfflineUUIDWrapper.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.intellectualcrafters.plot.util; - -import java.util.UUID; - -import org.bukkit.Bukkit; -import org.bukkit.OfflinePlayer; -import org.bukkit.entity.Player; - -import com.google.common.base.Charsets; -import com.google.common.collect.BiMap; -import com.intellectualcrafters.plot.object.StringWrapper; - -public class OfflineUUIDWrapper extends UUIDWrapper { - - @Override - public UUID getUUID(Player player) { - return UUID.nameUUIDFromBytes(("OfflinePlayer:" + player.getName()).getBytes(Charsets.UTF_8)); - } - - @Override - public UUID getUUID(OfflinePlayer player) { - return UUID.nameUUIDFromBytes(("OfflinePlayer:" + player.getName()).getBytes(Charsets.UTF_8)); - } - - @Override - public OfflinePlayer getOfflinePlayer(UUID uuid) { - BiMap map = UUIDHandler.getUuidMap().inverse(); - String name = map.get(uuid).value; - if (name != null) { - return Bukkit.getOfflinePlayer(name); - } - else { - for (OfflinePlayer player : Bukkit.getOfflinePlayers()) { - if (getUUID(player).equals(uuid)) { - return player; - } - } - } - return Bukkit.getOfflinePlayer(uuid.toString()); - } - - @Override - public Player getPlayer(UUID uuid) { - for (Player player : Bukkit.getOnlinePlayers()) { - if (getUUID(player).equals(uuid)) { - return player; - } - } - return null; - } - - - -} diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/UUIDWrapper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/UUIDWrapper.java deleted file mode 100644 index e1fc1b3a7..000000000 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/UUIDWrapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.intellectualcrafters.plot.util; - -import java.util.UUID; - -import org.bukkit.OfflinePlayer; -import org.bukkit.entity.Player; - -public abstract class UUIDWrapper { - public abstract UUID getUUID(Player player); - - public abstract UUID getUUID(OfflinePlayer player); - - public abstract OfflinePlayer getOfflinePlayer(UUID uuid); - - public abstract Player getPlayer(UUID uuid); -}