Skip to content

Commit

Permalink
swith from String to UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
Snabeldier committed Dec 18, 2024
1 parent 10de1f7 commit 10871aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/main/java/minevalley/core/api/Core.java
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public static List<MetadataValue> 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);
}

Expand All @@ -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);
}

Expand All @@ -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);
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/minevalley/core/api/CoreServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public interface CoreServer {

double getStatistic(String key);

User getUser(String uuid);
User getUser(UUID uuid);

OnlineUser getOnlineUser(Player player);

Expand All @@ -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);

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/minevalley/core/api/users/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -24,7 +25,7 @@ public interface User extends Registrant {
*
* @return unique id as string
*/
String getUniqueId();
UUID getUniqueId();

String getName();

Expand Down

0 comments on commit 10871aa

Please sign in to comment.