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.
This commit is contained in:
BONNe 2019-02-20 11:49:18 +02:00 committed by Florian CUNY
parent bce30ce83d
commit f5bbe35bd8

View File

@ -24,7 +24,7 @@ public class IslandSethomeCommand extends ConfirmableCommand {
@Override
public boolean canExecute(User user, String label, List<String> 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;
}