Skip to content

Commit

Permalink
Fixes an issue with incorrect message reporting (#119)
Browse files Browse the repository at this point in the history
In the Discord was a complaint that `why` command reported that for non-owners they receive `offline-player` message instead of `player-is-not-owner`. 

This happened because I missed adding a check for comparing if the island owner is the targetUUID.
  • Loading branch information
BONNe committed Oct 13, 2022
1 parent ea0f79c commit d51f4bc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public boolean execute(User user, String label, List<String> args)
// Set meta data on player
Island island = this.getAddon().getIslands().getIsland(this.getWorld(), targetUUID);

if (island == null || island.getOwner() == null)
if (island == null || island.getOwner() == null || !island.getOwner().equals(targetUUID))
{
Utils.sendMessage(user,
user.getTranslation("general.errors.player-is-not-owner"));
Expand Down

0 comments on commit d51f4bc

Please sign in to comment.