SirBlobman / CombatLogX

A modular Spigot plugin that prevents players from logging out during combat and has many expansions for extra features.
https://www.spigotmc.org/resources/31689/
GNU General Public License v3.0
154 stars 52 forks source link

when attacking player it spams an error #847

Closed TeoES1 closed 2 months ago

TeoES1 commented 2 months ago

Server Implementation

Paper

Server Version

1.21

Describe the bug

Could not pass event PlayerTagEvent to CombatLogX v11.5.0.0.1242 java.lang.IncompatibleClassChangeError: Found interface org.bukkit.inventory.InventoryView, but class was expected at combatlogx.expansion.cheat.prevention.listener.ListenerInventories.onTag(ListenerInventories.java:29) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor320.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-2302-0a9941e] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at CombatLogX.jar/com.github.sirblobman.combatlogx.manager.CombatManager.tag(CombatManager.java:108) ~[CombatLogX.jar:?] at CombatLogX.jar/com.github.sirblobman.combatlogx.manager.CombatManager.tag(CombatManager.java:65) ~[CombatLogX.jar:?] at CombatLogX.jar/com.github.sirblobman.combatlogx.listener.ListenerDamage.checkTag(ListenerDamage.java:134) ~[CombatLogX.jar:?] at CombatLogX.jar/com.github.sirblobman.combatlogx.listener.ListenerDamage.onDamage(ListenerDamage.java:44) ~[CombatLogX.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor291.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-2302-0a9941e] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.event.CraftEventFactory.callEvent(CraftEventFactory.java:277) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:1219) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:1209) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.craftbukkit.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:1138) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.craftbukkit.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:1101) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.craftbukkit.event.CraftEventFactory.handleLivingEntityDamageEvent(CraftEventFactory.java:1257) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.world.entity.LivingEntity.handleEntityDamage(LivingEntity.java:2420) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.world.entity.LivingEntity.hurt(LivingEntity.java:1553) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.world.entity.player.Player.hurt(Player.java:1041) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.level.ServerPlayer.hurt(ServerPlayer.java:1235) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.world.entity.player.Player.attack(Player.java:1383) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.level.ServerPlayer.attack(ServerPlayer.java:2544) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.network.ServerGamePacketListenerImpl$4.onAttack(ServerGamePacketListenerImpl.java:2953) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.network.protocol.game.ServerboundInteractPacket$1.dispatch(ServerboundInteractPacket.java:29) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.network.protocol.game.ServerboundInteractPacket.dispatch(ServerboundInteractPacket.java:89) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleInteract(ServerGamePacketListenerImpl.java:2862) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:76) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:14) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:56) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1574) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1551) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1544) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1503) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1510) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1355) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:334) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at java.base/java.lang.Thread.run(Thread.java:1570) ~[?:?] [04:26:44 ERROR]: Could not pass event PlayerTagEvent to CombatLogX v11.5.0.0.1242 java.lang.IncompatibleClassChangeError: Found interface org.bukkit.inventory.InventoryView, but class was expected at combatlogx.expansion.cheat.prevention.listener.ListenerInventories.onTag(ListenerInventories.java:29) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor320.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-2302-0a9941e] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at CombatLogX.jar/com.github.sirblobman.combatlogx.manager.CombatManager.tag(CombatManager.java:108) ~[CombatLogX.jar:?] at CombatLogX.jar/com.github.sirblobman.combatlogx.manager.CombatManager.tag(CombatManager.java:65) ~[CombatLogX.jar:?] at CombatLogX.jar/com.github.sirblobman.combatlogx.listener.ListenerDamage.checkTag(ListenerDamage.java:134) ~[CombatLogX.jar:?] at CombatLogX.jar/com.github.sirblobman.combatlogx.listener.ListenerDamage.onDamage(ListenerDamage.java:45) ~[CombatLogX.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor291.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-2302-0a9941e] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.event.CraftEventFactory.callEvent(CraftEventFactory.java:277) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:1219) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:1209) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.craftbukkit.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:1138) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.craftbukkit.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:1101) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at org.bukkit.craftbukkit.event.CraftEventFactory.handleLivingEntityDamageEvent(CraftEventFactory.java:1257) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.world.entity.LivingEntity.handleEntityDamage(LivingEntity.java:2420) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.world.entity.LivingEntity.hurt(LivingEntity.java:1553) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.world.entity.player.Player.hurt(Player.java:1041) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.level.ServerPlayer.hurt(ServerPlayer.java:1235) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.world.entity.player.Player.attack(Player.java:1383) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.level.ServerPlayer.attack(ServerPlayer.java:2544) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.network.ServerGamePacketListenerImpl$4.onAttack(ServerGamePacketListenerImpl.java:2953) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.network.protocol.game.ServerboundInteractPacket$1.dispatch(ServerboundInteractPacket.java:29) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.network.protocol.game.ServerboundInteractPacket.dispatch(ServerboundInteractPacket.java:89) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleInteract(ServerGamePacketListenerImpl.java:2862) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:76) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:14) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:56) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1574) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1551) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1544) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1503) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1510) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1355) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:334) ~[purpur-1.21.1.jar:1.21.1-2302-0a9941e] at java.base/java.lang.Thread.run(Thread.java:1570) ~[?:?]

Reproduction Steps

1.Open the expansion CheatPrevention 2.Open the file inventories.yml 3.Make "close" to true

**# Should CombatLogX close a player's inventory when they are first tagged into combat?
# Default: true
close: true**

Expected behaviour

to not spam the console with errors when attacking player

Screenshots / Videos

No response

latest log file (if applicable)

No response

CombatLogX Version

11.5.0.0.1242

Anything else?

No response

Olivoz commented 2 months ago

This has already been fixed in beta builds.

Related to #837 and #839