mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 21:27:44 +01:00
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:
parent
4d8bb71354
commit
2ded5be6d6
@ -119,7 +119,7 @@ public class IslandExpelCommand extends CompositeCommand {
|
|||||||
} else if (getIslands().getSpawn(getWorld()).isPresent()){
|
} else if (getIslands().getSpawn(getWorld()).isPresent()){
|
||||||
// Success
|
// Success
|
||||||
user.sendMessage(SUCCESS);
|
user.sendMessage(SUCCESS);
|
||||||
getIslands().spawnTeleport(getWorld(), user.getPlayer());
|
getIslands().spawnTeleport(getWorld(), target.getPlayer());
|
||||||
return true;
|
return true;
|
||||||
} else if (getIWM().getAddon(getWorld())
|
} else if (getIWM().getAddon(getWorld())
|
||||||
.map(gm -> gm.getPlayerCommand()
|
.map(gm -> gm.getPlayerCommand()
|
||||||
|
Loading…
Reference in New Issue
Block a user