Auxilor / eco

Spigot development library, built for the latest version.
MIT License
155 stars 51 forks source link

eco always prompts String.isEmpty()" because "text" is null #343

Closed Cuhuang1 closed 1 month ago

Cuhuang1 commented 8 months ago

[21:16:30] [Server thread/INFO]: Cu_huang[/127.0.0.1:62513] logged in with entity id 602 at ([world]159.77569516337866, 68.0, -32.30000001192093) [21:16:30] [Netty Server IO #1/WARN]: [eco] Exception in packet listener com.willfp.eco.internal.spigot.proxy.v1_20_R1.common.packet.display.PacketWindowItems for packet net.minecraft.network.protocol.game.PacketPlayOutWindowItems! [21:16:30] [Netty Server IO #1/WARN]: java.lang.NullPointerException: Cannot invoke "String.isEmpty()" because "text" is null [21:16:30] [Netty Server IO #1/WARN]: at net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializerImpl$Cereal.component(LegacyComponentSerializerImpl.java:326) [21:16:30] [Netty Server IO #1/WARN]: at net.kyori.adventure.text.flattener.ComponentFlattenerImpl.lambda$flattener$3(ComponentFlattenerImpl.java:117) [21:16:30] [Netty Server IO #1/WARN]: at net.kyori.adventure.text.flattener.ComponentFlattenerImpl.flatten0(ComponentFlattenerImpl.java:95) [21:16:30] [Netty Server IO #1/WARN]: at net.kyori.adventure.text.flattener.ComponentFlattenerImpl.flatten(ComponentFlattenerImpl.java:78) [21:16:30] [Netty Server IO #1/WARN]: at net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializerImpl.serialize(LegacyComponentSerializerImpl.java:271) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2677) [21:16:30] [Netty Server IO #1/WARN]: at java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1955) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2675) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2658) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:112) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:62) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.willfp.eco.util.StringUtils.toLegacy(StringUtils.java:620) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.willfp.eco.internal.spigot.proxy.v1_20_R1.common.item.EcoFastItemStack.getLore(EcoFastItemStack.kt:125) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.willfp.eco.core.display.Display.revert(Display.java:144) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.willfp.eco.core.display.Display.display(Display.java:70) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.willfp.eco.internal.spigot.proxy.v1_20_R1.common.packet.display.PacketWindowItems.modifyWindowItems(PacketWindowItems.kt:76) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.willfp.eco.internal.spigot.proxy.v1_20_R1.common.packet.display.PacketWindowItems.onSend(PacketWindowItems.kt:49) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.willfp.eco.internal.events.EcoEventManagerKt.handleSend(EcoEventManager.kt:26) [21:16:30] [Netty Server IO #1/WARN]: at eco-6.68.3-all.jar//com.willfp.eco.internal.spigot.proxy.v1_20_R1.common.packet.EcoChannelDuplexHandler.write(EcoChannelDuplexHandler.kt:39)

WillFP commented 1 month ago

fixed