fix(EffectHandle): fix ConcurrentModificationException
This commit is contained in:
parent
f23a010a02
commit
dfaedeabc2
@ -17,6 +17,7 @@ import org.koin.core.annotation.Single
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.logging.Level
|
import java.util.logging.Level
|
||||||
|
|
||||||
|
|
||||||
@Single
|
@Single
|
||||||
class EffectHandle(
|
class EffectHandle(
|
||||||
private val configService: ConfigService,
|
private val configService: ConfigService,
|
||||||
@ -435,11 +436,10 @@ class EffectHandle(
|
|||||||
for (p in plugin.server.onlinePlayers) {
|
for (p in plugin.server.onlinePlayers) {
|
||||||
gui.fixBar(p)
|
gui.fixBar(p)
|
||||||
}
|
}
|
||||||
for ((key, value) in infernalMobService.mountList) {
|
for ((key, value) in infernalMobService.mountList.toMutableMap()) {
|
||||||
if (!key.isDead) {
|
if (!key.isDead) {
|
||||||
if ((value.isDead) && ((key is LivingEntity))) {
|
if ((value.isDead) && ((key is LivingEntity))) {
|
||||||
val fate = configService.mainConfig.mountFate
|
val fate: String = configService.mainConfig.mountFate
|
||||||
|
|
||||||
if (fate == "death") {
|
if (fate == "death") {
|
||||||
val le = key as LivingEntity?
|
val le = key as LivingEntity?
|
||||||
le!!.damage(9.99999999E8)
|
le!!.damage(9.99999999E8)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user