diff --git a/src/main/java/minevalley/core/api/Core.java b/src/main/java/minevalley/core/api/Core.java index db60ef3e..17703031 100644 --- a/src/main/java/minevalley/core/api/Core.java +++ b/src/main/java/minevalley/core/api/Core.java @@ -350,7 +350,7 @@ public static List getMetadata(Metadatable metadatable, String ke * @param uniqueId uniqueId to get user from * @return user object of the given uniqueId */ - public static User getUser(String uniqueId) { + public static User getUser(UUID uniqueId) { return server.getUser(uniqueId); } @@ -364,7 +364,7 @@ public static OnlineUser getOnlineUser(Player player) { * @param uniqueId unique id of the player * @return name of the player */ - public static String getName(String uniqueId) { + public static String getName(UUID uniqueId) { return server.getName(uniqueId); } @@ -374,7 +374,7 @@ public static String getName(String uniqueId) { * @param name name of the player * @return unique id of the player */ - public static String getUniqueId(String name) { + public static UUID getUniqueId(String name) { return server.getUniqueId(name); } diff --git a/src/main/java/minevalley/core/api/CoreServer.java b/src/main/java/minevalley/core/api/CoreServer.java index e3bdf963..d45960e2 100644 --- a/src/main/java/minevalley/core/api/CoreServer.java +++ b/src/main/java/minevalley/core/api/CoreServer.java @@ -119,7 +119,7 @@ public interface CoreServer { double getStatistic(String key); - User getUser(String uuid); + User getUser(UUID uuid); OnlineUser getOnlineUser(Player player); @@ -135,9 +135,9 @@ public interface CoreServer { Gson getGson(); - String getName(String uniqueId); + String getName(UUID uniqueId); - String getUniqueId(String name); + UUID getUniqueId(String name); String removeColorCodes(String text); diff --git a/src/main/java/minevalley/core/api/users/User.java b/src/main/java/minevalley/core/api/users/User.java index 6da82aba..bf6012b5 100644 --- a/src/main/java/minevalley/core/api/users/User.java +++ b/src/main/java/minevalley/core/api/users/User.java @@ -12,6 +12,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Map; +import java.util.UUID; public interface User extends Registrant { @@ -24,7 +25,7 @@ public interface User extends Registrant { * * @return unique id as string */ - String getUniqueId(); + UUID getUniqueId(); String getName();