diff --git a/src/main/java/com/dre/brewery/BPlayer.java b/src/main/java/com/dre/brewery/BPlayer.java index a6923276..a67802ad 100644 --- a/src/main/java/com/dre/brewery/BPlayer.java +++ b/src/main/java/com/dre/brewery/BPlayer.java @@ -111,7 +111,7 @@ public BPlayer(UUID uuid) { @Nullable public static BPlayer get(OfflinePlayer player) { if (!players.isEmpty()) { - return players.get(BUtil.playerString(player)); + return players.get(player.getUniqueId().toString()); } return null; } @@ -156,18 +156,18 @@ public static boolean isEmpty() { } public static boolean hasPlayer(OfflinePlayer player) { - return players.containsKey(BUtil.playerString(player)); + return players.containsKey(player.getUniqueId().toString()); } // Create a new BPlayer and add it to the list public static BPlayer addPlayer(OfflinePlayer player) { - BPlayer bPlayer = new BPlayer(BUtil.playerString(player)); - players.put(BUtil.playerString(player), bPlayer); + BPlayer bPlayer = new BPlayer(player.getUniqueId()); + players.put(player.getUniqueId().toString(), bPlayer); return bPlayer; } public static void remove(OfflinePlayer player) { - players.remove(BUtil.playerString(player)); + players.remove(player.getUniqueId().toString()); } diff --git a/src/main/java/com/dre/brewery/integration/papi/PlaceholderAPIManager.java b/src/main/java/com/dre/brewery/integration/papi/PlaceholderAPIManager.java index a2807938..22ec5250 100644 --- a/src/main/java/com/dre/brewery/integration/papi/PlaceholderAPIManager.java +++ b/src/main/java/com/dre/brewery/integration/papi/PlaceholderAPIManager.java @@ -69,7 +69,7 @@ public boolean persist() { @Override public String onRequest(OfflinePlayer player, @NotNull String params) { BPlayer bPlayer = BPlayer.get(player); - if (bPlayer == null) bPlayer = new BPlayer(BUtil.playerString(player)); + if (bPlayer == null) bPlayer = new BPlayer(player.getUniqueId()); String[] args = params.split("_"); diff --git a/src/main/java/com/dre/brewery/utility/BUtil.java b/src/main/java/com/dre/brewery/utility/BUtil.java index 4beb0686..884b2224 100644 --- a/src/main/java/com/dre/brewery/utility/BUtil.java +++ b/src/main/java/com/dre/brewery/utility/BUtil.java @@ -157,13 +157,6 @@ public static void setItemInHand(PlayerInteractEvent event, Material mat, boolea } } - /** - * Returns either uuid or Name of player, depending on bukkit version - */ - public static String playerString(OfflinePlayer player) { - return player.getUniqueId().toString(); - } - /** * returns the Player if online