Fixes user being spawned instead of target (#646)

If target had no island to be expelled to, second if statement would expel User (executor) itself
This commit is contained in:
wellnesscookie 2019-04-30 03:25:08 +02:00 committed by tastybento
parent 4d8bb71354
commit 2ded5be6d6

View File

@ -119,7 +119,7 @@ public class IslandExpelCommand extends CompositeCommand {
} else if (getIslands().getSpawn(getWorld()).isPresent()){
// Success
user.sendMessage(SUCCESS);
getIslands().spawnTeleport(getWorld(), user.getPlayer());
getIslands().spawnTeleport(getWorld(), target.getPlayer());
return true;
} else if (getIWM().getAddon(getWorld())
.map(gm -> gm.getPlayerCommand()