mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-28 13:36:33 +01:00
Fix "Removing entity while ticking!" bug
This commit is contained in:
parent
2b1c09d0d7
commit
ce7790f341
@ -55,6 +55,7 @@ import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
* @author Frank Baumann, Tobias Schmitz, Milan Albrecht, Daniel Saukel
|
||||
@ -692,8 +693,13 @@ public class DGamePlayer extends DInstancePlayer implements GamePlayer {
|
||||
}
|
||||
|
||||
if ((dGroup.getLives() == 0 || lives == 0) && ready) {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
kill();
|
||||
}
|
||||
}.runTaskLater(plugin, 1L);
|
||||
}
|
||||
|
||||
if (rules.getState(GameRule.GAME_GOAL) == GameGoal.LAST_MAN_STANDING) {
|
||||
if (game.getGroups().size() == 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user