Skip to content

Commit

Permalink
Fix Cancel Message
Browse files Browse the repository at this point in the history
Fixed players not being notified when they were on the server that their item was either cancelled or has expired.
  • Loading branch information
TrueDarkLord committed Jan 3, 2025
1 parent de22091 commit 9f7d31e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions paper/src/main/java/com/badbones69/crazyauctions/Methods.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public static boolean isLong(String s) {
return true;
}

public static Player getPlayer(String name) {
public static Player getPlayer(String uuid) {
try {
return plugin.getServer().getPlayer(UUID.fromString(name));
return plugin.getServer().getPlayer(UUID.fromString(uuid));
} catch (Exception e) {
return null;
}
Expand All @@ -94,9 +94,9 @@ public static boolean isUUID(String uuid) {
return UUID_PATTERN.matcher(uuid).find();
}

public static boolean isOnline(String name) {
public static boolean isOnline(String uuid) {
for (Player player : plugin.getServer().getOnlinePlayers()) {
if (player.getName().equalsIgnoreCase(name)) {
if (player.getUniqueId().toString().equals(uuid)) {
return true;
}
}
Expand Down

0 comments on commit 9f7d31e

Please sign in to comment.