Skip to content

Commit 574db13

Browse files
added the CommandSender#getId() method
1 parent 5697d24 commit 574db13

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

bungee/src/main/java/com/wizardlybump17/wlib/bungee/command/sender/BungeeCommandSender.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,11 @@ public boolean hasPermission(String permission) {
8484
public boolean hasId(@NotNull UUID id) {
8585
return handle instanceof ProxiedPlayer player && player.getUniqueId().equals(id);
8686
}
87+
88+
@Override
89+
public @NotNull UUID getId() throws IllegalStateException {
90+
if (handle instanceof ProxiedPlayer player)
91+
return player.getUniqueId();
92+
throw new IllegalStateException(handle + " does not have an ID");
93+
}
8794
}

0 commit comments

Comments
 (0)