Simplified condition in IslandCreateEvent

This commit is contained in:
Florian CUNY 2018-09-15 10:44:04 +02:00
parent 02be048192
commit 102ad864e1

View File

@ -32,11 +32,8 @@ public class IslandCreateCommand extends CompositeCommand {
@Override
public boolean execute(User user, String label, List<String> args) {
if (getIslands().hasIsland(getWorld(), user.getUniqueId())) {
user.sendMessage("general.errors.already-have-island");
return false;
}
if (getIslands().inTeam(getWorld(), user.getUniqueId())) {
if (getIslands().hasIsland(getWorld(), user.getUniqueId())
|| getIslands().inTeam(getWorld(), user.getUniqueId())) {
user.sendMessage("general.errors.already-have-island");
return false;
}