Skip to content

Commit

Permalink
Tiny refactor: use better way to get sender's UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnicJelle committed Jan 20, 2024
1 parent c6a9d2e commit db62175
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command

// === SELF ===
if (sender instanceof Player) { // only players can self
UUID senderUUID = sender.getServer().getPlayerUniqueId(sender.getName());
Player player = (Player) sender;
UUID senderUUID = player.getUniqueId();
if (args.length == 0) {
//toggle
if (api.getWebApp().getPlayerVisibility(senderUUID)) {
Expand Down Expand Up @@ -107,7 +108,7 @@ private static void hideOther(BlueMapAPI api, @NotNull CommandSender sender, Pla
}

@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
List<String> completions = new ArrayList<>();
if (args.length == 1) {
completions.add("show");
Expand Down

0 comments on commit db62175

Please sign in to comment.