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

Error on grass break / Problems with placeholders and colors #824

Closed mihiblu closed 5 months ago

mihiblu commented 7 months ago

Server Implementation

Spigot

Server Version

other

Describe the bug

When I break a grass, small or tall, I have this error:

[16:23:03 ERROR]: Could not pass event PlayerInteractEvent to CombatLogX v11.4.0.1.1193 java.lang.IllegalArgumentException: Unsupported material with no data value: SHORT_GRASS at com.github.sirblobman.api.shaded.xseries.XMaterial.lambda$matchXMaterial$0(XMaterial.java:1817) ~[BlueSlimeCore.jar:?] at java.util.Optional.orElseThrow(Optional.java:403) ~[?:?] at com.github.sirblobman.api.shaded.xseries.XMaterial.matchXMaterial(XMaterial.java:1817) ~[BlueSlimeCore.jar:?] at combatlogx.expansion.cheat.prevention.listener.ListenerBlocks.fetchMaterial(ListenerBlocks.java:111) ~[?:?] at combatlogx.expansion.cheat.prevention.listener.ListenerBlocks.onInteract(ListenerBlocks.java:41) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor788.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:git-Paper-461] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.4.jar:git-Paper-461] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.4.jar:git-Paper-461] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:593) ~[paper-1.20.4.jar:git-Paper-461] at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:549) ~[paper-1.20.4.jar:git-Paper-461] at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:544) ~[paper-1.20.4.jar:git-Paper-461] at net.minecraft.server.level.ServerPlayerGameMode.handleBlockBreakAction(ServerPlayerGameMode.java:199) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handlePlayerAction(ServerGamePacketListenerImpl.java:1847) ~[?:?] at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.handle(ServerboundPlayerActionPacket.java:42) ~[?:?] at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.a(ServerboundPlayerActionPacket.java:15) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.4.jar:git-Paper-461] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1465) ~[paper-1.20.4.jar:git-Paper-461] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194) ~[paper-1.20.4.jar:git-Paper-461] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1442) ~[paper-1.20.4.jar:git-Paper-461] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1365) ~[paper-1.20.4.jar:git-Paper-461] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1343) ~[paper-1.20.4.jar:git-Paper-461] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1232) ~[paper-1.20.4.jar:git-Paper-461] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-461] at java.lang.Thread.run(Thread.java:840) ~[?:?]

    Also, any idea why some placeholders or color codes doesn't work in certain messages? For example the toggle placeholder's color isn't applied, it is just putted as text. (<red>/<green>). Or another example when I execute /pvptoggle but I don't have the extension.

Reproduction Steps

  1. Just break a grass. In combat or not, same thing. Op or not same thing.

Expected behaviour

-

Screenshots / Videos

image

latest log file (if applicable)

https://pastebin.com/jaAycWtN

CombatLogX Version

Don't return something but the latest one from spigot. Also for BlueSlimeCore image

Anything else?

No response

mihiblu commented 7 months ago

I forgot to mention, I have also the latest version for extensions.

Olivoz commented 7 months ago

The version of CombatLogX you're running does not support 1.20.4, update to the latest beta build of CombatLogX and BlueSlimeCore from the jenkins.

As for the messages {} indicates it's a missing message (EDIT: or invalid placeholder) in your selected language file. Refer to the default en_us and add the missing messages.