Skip to content

Commit

Permalink
Fix accessor addition logic in ChestShop
Browse files Browse the repository at this point in the history
This commit refactors the addAccessor command logic in the ChestShop application. It now compares the newAccessor to the actual owner of the chest shop instead of the player's ID. This change ensures more accurate assignment of access permissions.
  • Loading branch information
Feli499 committed Jan 1, 2024
1 parent 8857089 commit 3d7c8c6
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -61,7 +61,8 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
return true;
}

if (player.getUniqueId().equals(newAccessor)) {
UUID owner = ChestShopSign.getOwner(sign);
if (owner.equals(newAccessor)) {
sender.sendMessage(Messages.prefix(Messages.OWNER_CANT_BE_ACCESSOR));
return true;
}
Expand Down

0 comments on commit 3d7c8c6

Please sign in to comment.