From f5bbe35bd818c86bb9c53af8d12d26459e0dfb86 Mon Sep 17 00:00:00 2001 From: BONNe Date: Wed, 20 Feb 2019 11:49:18 +0200 Subject: [PATCH] Fixed members not being able to set homes (#569) #538 It happened because IslandManager#hasIsland(World,User) returns true only if island is owned by player, team members will always gets false, as they do not directly own an island. --- .../bentobox/api/commands/island/IslandSethomeCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandSethomeCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandSethomeCommand.java index 125f93423..9c8095b60 100644 --- a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandSethomeCommand.java +++ b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandSethomeCommand.java @@ -24,7 +24,7 @@ public class IslandSethomeCommand extends ConfirmableCommand { @Override public boolean canExecute(User user, String label, List args) { // Check island - if (!getPlugin().getIslands().hasIsland(getWorld(), user)) { + if (!getPlugin().getIslands().hasIsland(getWorld(), user) && !getPlugin().getIslands().inTeam(getWorld(), user.getUniqueId())) { user.sendMessage("general.errors.no-island"); return false; }