mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-28 13:36:33 +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() {
|
public void kickAllPlayers() {
|
||||||
getPlayers().forEach(p -> p.leave());
|
getPlayers().forEach(p -> p.leave());
|
||||||
// Players who shouldn't be in the dungeon but still are for some reason
|
// 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