mirror of
https://github.com/Artillex-Studios/AxMinions.git
synced 2024-11-29 12:45:18 +01:00
Possibly fix SSB2 lag
This commit is contained in:
parent
286f8f14f1
commit
c1dc103219
@ -156,7 +156,6 @@ shadowJar {
|
||||
relocate("net.kyori", "com.artillexstudios.axminions.libs.kyori")
|
||||
relocate("revxrsal.commands", "com.artillexstudios.axminions.libs.lamp")
|
||||
relocate("org.jetbrains.annotations", "com.artillexstudios.axminions.libs.annotations")
|
||||
relocate("org.slf4j", "com.artillexstudios.axminions.libs.slf4j")
|
||||
relocate("org.intellij.lang.annotations", "com.artillexstudios.axminions.libs.intellij.annotations")
|
||||
}
|
||||
|
||||
|
@ -2,8 +2,10 @@ package com.artillexstudios.axminions.listeners
|
||||
|
||||
import com.artillexstudios.axminions.minions.Minions
|
||||
import com.bgsoftware.superiorskyblock.api.events.IslandDisbandEvent
|
||||
import org.bukkit.World.Environment
|
||||
import org.bukkit.event.EventHandler
|
||||
import org.bukkit.event.Listener
|
||||
import org.bukkit.World
|
||||
|
||||
class SuperiorSkyBlock2Listener : Listener {
|
||||
|
||||
@ -11,10 +13,12 @@ class SuperiorSkyBlock2Listener : Listener {
|
||||
fun onIslandDisbandEvent(event: IslandDisbandEvent) {
|
||||
val minions = Minions.getMinions()
|
||||
|
||||
event.island.allChunks.forEach { chunk ->
|
||||
minions.forEach { minion ->
|
||||
if (minion.getLocation().chunk == chunk) {
|
||||
minion.remove()
|
||||
Environment.entries.forEach { entry ->
|
||||
event.island.getAllChunksAsync(entry, true) {}.forEach { chunk ->
|
||||
minions.forEach { minion ->
|
||||
if (minion.getLocation().chunk == chunk) {
|
||||
minion.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user