From 9fb08d62282c37e80bb32de8279aff1b6545ecae Mon Sep 17 00:00:00 2001 From: acrylic-style Date: Sun, 10 Nov 2024 12:23:39 +0900 Subject: [PATCH] add `disable-item-frame-map-update` config option --- build.gradle.kts | 2 +- src/main/java/com/github/mori01231/lifecore/LifeCore.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 78a07de..424f616 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } group = "net.azisaba" -version = "6.18.4+1.21.1" +version = "6.18.4a+1.21.1" java { toolchain.languageVersion.set(JavaLanguageVersion.of(21)) diff --git a/src/main/java/com/github/mori01231/lifecore/LifeCore.kt b/src/main/java/com/github/mori01231/lifecore/LifeCore.kt index b122bd2..1c06889 100644 --- a/src/main/java/com/github/mori01231/lifecore/LifeCore.kt +++ b/src/main/java/com/github/mori01231/lifecore/LifeCore.kt @@ -197,6 +197,7 @@ class LifeCore : JavaPlugin() { } } if (Bukkit.getOnlinePlayers().isEmpty()) return@Runnable + if (config.getBoolean("disable-item-frame-map-update", false)) return@Runnable Bukkit.getWorlds().forEach world@ { world -> world.getEntitiesByClass(ItemFrame::class.java).forEach { itemFrame -> Bukkit.getScheduler().runTaskAsynchronously(this, Runnable {