Skip to content

Commit

Permalink
chore: reloadWorldをMultiverse経由で行う
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Feb 27, 2024
1 parent eca19ba commit 0cea97f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import cats.effect.{Concurrent, Sync}
import com.github.unchama.itemmigration.bukkit.util.MigrationHelper
import com.github.unchama.itemmigration.domain.{ItemMigrationTarget, ItemStackConversion}
import com.github.unchama.util.MillisecondTimer
import com.github.unchama.util.external.ExternalPlugins
import org.bukkit.block.Container
import org.bukkit.entity.{Item, ItemFrame}
import org.bukkit.inventory.{InventoryHolder, ItemStack}
Expand Down Expand Up @@ -73,7 +74,8 @@ object WorldLevelData {
logger.info(s"${world.getName}を再読み込みします…")

val creator = WorldCreator.name(world.getName).copy(world)
if (!Bukkit.unloadWorld(world, true)) {
val mvWorldManager = ExternalPlugins.getMultiverseCore.getMVWorldManager
if (!mvWorldManager.unloadWorld(world.getName)) {
logger.warn(s"${world.getName}はアンロードされませんでした。")
}
Bukkit.createWorld(creator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ class BukkitMaterial extends MinecraftMaterial[Material, ItemStack] {
new ItemStack(material, 1)

}

0 comments on commit 0cea97f

Please sign in to comment.