mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Fix kickAllPlayers() NPE
This commit is contained in:
parent
fbb08ac232
commit
74f3829282
@ -170,7 +170,9 @@ public abstract class DInstanceWorld implements InstanceWorld {
|
||||
public void kickAllPlayers() {
|
||||
getPlayers().forEach(p -> p.leave());
|
||||
// Players who shouldn't be in the dungeon but still are for some reason
|
||||
getWorld().getPlayers().forEach(p -> PlayerUtil.secureTeleport(p, Bukkit.getWorlds().get(0).getSpawnLocation()));
|
||||
if (world != null) {
|
||||
getWorld().getPlayers().forEach(p -> PlayerUtil.secureTeleport(p, Bukkit.getWorlds().get(0).getSpawnLocation()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user