MohistMC/Mohist

[1.20.1] 出现错误提示: PlayerInteractEntityEvent

1425115471 opened this issue · 2 comments

服务端版本:mohist-1.20.1-894-server
CMI插件是最新版本,自定义NPC也是最新版本。
错误出现的时候,玩家右键NPC的时候,会报这个错误:
[20:05:49 ERROR]: 无法将事件 PlayerInteractEntityEvent 传递给
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[forge-1.20.1-47.3.11-universal.jar%23217!/:?]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[forge-1.20.1-47.3.11-universal.jar%23217!/:?]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:604) ~[forge-1.20.1-47.3.11-universal.jar%23217!/:?]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:588) ~[forge-1.20.1-47.3.11-universal.jar%23217!/:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl$1.m_143678_(ServerGamePacketListenerImpl.java:2174) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl$1.m_142299_(ServerGamePacketListenerImpl.java:2219) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.network.protocol.game.ServerboundInteractPacket$InteractionAction.m_142457_(ServerboundInteractPacket.java:124) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.network.protocol.game.ServerboundInteractPacket.m_179617_(ServerboundInteractPacket.java:75) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.m_6946_(ServerGamePacketListenerImpl.java:2163) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.network.protocol.game.ServerboundInteractPacket.m_5797_(ServerboundInteractPacket.java:62) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.network.protocol.game.ServerboundInteractPacket.m_5797_(ServerboundInteractPacket.java:12) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.network.protocol.PacketUtils.m_263899_(PacketUtils.java:25) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:151) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:1026) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:176) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:124) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:1009) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:1003) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:134) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:989) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:914) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:286) ~[server-1.20.1-20230612.114412-srg.jar%23212!/:?]
at java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "net.Zrips.CMILib.Entities.CMIEntityType.ordinal()" because the return value of "net.Zrips.CMILib.Entities.CMIEntityType.get(org.bukkit.entity.Entity)" is null
at com.bekvon.bukkit.residence.listeners.ResidencePlayerListener.canHaveContainer(ResidencePlayerListener.java:1656) ~[?:?]
at com.bekvon.bukkit.residence.listeners.ResidencePlayerListener.onPlayerInteractWithHorse(ResidencePlayerListener.java:1680) ~[?:?]
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:304) ~[forge-1.20.1-47.3.11-universal.jar%23217!/:?]
... 24 more

<script src="https://gist.github.com/1425115471/f14e2780b8c1046e17b8aadef5fbfeb9.js"></script>

CMI不支持mod的实体