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,8 +170,10 @@ 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
|
||||||
|
if (world != null) {
|
||||||
getWorld().getPlayers().forEach(p -> PlayerUtil.secureTeleport(p, Bukkit.getWorlds().get(0).getSpawnLocation()));
|
getWorld().getPlayers().forEach(p -> PlayerUtil.secureTeleport(p, Bukkit.getWorlds().get(0).getSpawnLocation()));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param rules sets up the time and weather to match the rules
|
* @param rules sets up the time and weather to match the rules
|
||||||
|
Loading…
Reference in New Issue
Block a user