Fixed adventure audience bug
This commit is contained in:
@@ -43,7 +43,7 @@ import java.util.logging.Logger
|
||||
class EcoHandler : EcoSpigotPlugin(), Handler {
|
||||
private val cleaner = EcoCleaner()
|
||||
private val requirementFactory = EcoRequirementFactory()
|
||||
private val adventure = BukkitAudiences.create(this);
|
||||
private lateinit var adventure: BukkitAudiences
|
||||
|
||||
override fun createScheduler(plugin: EcoPlugin): Scheduler {
|
||||
return EcoScheduler(plugin)
|
||||
@@ -132,4 +132,8 @@ class EcoHandler : EcoSpigotPlugin(), Handler {
|
||||
override fun getAdventure(): BukkitAudiences {
|
||||
return adventure
|
||||
}
|
||||
|
||||
fun setAdventure(adventure: BukkitAudiences) {
|
||||
this.adventure = adventure
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ import com.willfp.eco.spigot.integrations.shop.ShopShopGuiPlus
|
||||
import com.willfp.eco.spigot.recipes.ShapedRecipeListener
|
||||
import com.willfp.eco.util.BlockUtils
|
||||
import com.willfp.eco.util.SkullUtils
|
||||
import net.kyori.adventure.platform.bukkit.BukkitAudiences
|
||||
import org.bukkit.Bukkit
|
||||
import org.bukkit.Material
|
||||
import org.bukkit.block.Block
|
||||
@@ -68,6 +69,7 @@ abstract class EcoSpigotPlugin : EcoPlugin(
|
||||
|
||||
override fun handleEnable() {
|
||||
CollatedRunnable(this)
|
||||
(Eco.getHandler() as EcoHandler).adventure = BukkitAudiences.create(this)
|
||||
|
||||
this.logger.info("Ignore messages about deprecated events!")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user