Include team members when sending banned players back to their island.

https://github.com/BentoBoxWorld/BentoBox/issues/1017
This commit is contained in:
tastybento 2019-11-05 09:49:11 -08:00
parent 83a67b7c75
commit 80d87d19f9

View File

@ -147,7 +147,7 @@ public class LockAndBanListener extends FlagListener {
*/
private void eject(Player player) {
// Teleport player to their home
if (getIslands().hasIsland(player.getWorld(), player.getUniqueId())) {
if (getIslands().hasIsland(player.getWorld(), player.getUniqueId()) || getIslands().inTeam(player.getWorld(), player.getUniqueId())) {
getIslands().homeTeleport(player.getWorld(), player);
} else if (getIslands().getSpawn(player.getWorld()).isPresent()) {
// Else, try to teleport him to the world spawn