Djaytan / mc-jobs-reborn-patch-place-break

A place-break patch extension of JobsReborn plugin for Bukkit servers (Minecraft).
MIT License
6 stars 2 forks source link

Logs noises when performing unsupporting job action types #570

Closed Djaytan closed 9 months ago

Djaytan commented 9 months ago

Observed/problematic behavior

When performing an unsupported job action type like collecting plantations (carrots, potatos, sweet berries, ...), the following exception stack trace is printed in the server logs when the plugin is installed:

[21:23:08 ERROR]: Could not pass event JobsPrePaymentEvent to JobsReborn-PatchPlaceBreak v3.0.0
fr.djaytan.mc.jrppb.spigot.adapter.SpigotAdapterException: Invalid job action type 'COLLECT' specified. Expecting one of the following: BREAK, TNTBREAK, PLACE
at fr.djaytan.mc.jrppb.spigot.adapter.SpigotAdapterException.invalidJobType(SpigotAdapterException.java:43) ~[JobsReborn-PatchPlaceBreak-3.0.0.jar:?]
at fr.djaytan.mc.jrppb.spigot.adapter.converter.ActionTypeConverter.convert(ActionTypeConverter.java:39) ~[JobsReborn-PatchPlaceBreak-3.0.0.jar:?]
at fr.djaytan.mc.jrppb.spigot.adapter.PatchPlaceBreakSpigotAdapterApi.isPlaceAndBreakExploit(PatchPlaceBreakSpigotAdapterApi.java:150) ~[JobsReborn-PatchPlaceBreak-3.0.0.jar:?]
at fr.djaytan.mc.jrppb.spigot.listener.jobs.JobsPrePaymentListener.patchOnJobsPrePayment(JobsPrePaymentListener.java:63) ~[JobsReborn-PatchPlaceBreak-3.0.0.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1142.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-196]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-196]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-196]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at com.gamingmesh.jobs.Jobs.action(Jobs.java:1185) ~[Jobs5.2.2.3.jar:?]
at com.gamingmesh.jobs.Jobs.action(Jobs.java:971) ~[Jobs5.2.2.3.jar:?]
at com.gamingmesh.jobs.listeners.JobsPaymentListener.onPlayerInteract(JobsPaymentListener.java:1768) ~[Jobs5.2.2.3.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor902.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-196]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-196]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-196]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:591) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:537) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:2015) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:37) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.a(ServerboundUseItemOnPacket.java:9) ~[?:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-196]
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:1338) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1315) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1308) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1286) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]
[21:23:08 ERROR]: Could not pass event JobsExpGainEvent to JobsReborn-PatchPlaceBreak v3.0.0
fr.djaytan.mc.jrppb.spigot.adapter.SpigotAdapterException: Invalid job action type 'COLLECT' specified. Expecting one of the following: BREAK, TNTBREAK, PLACE
at fr.djaytan.mc.jrppb.spigot.adapter.SpigotAdapterException.invalidJobType(SpigotAdapterException.java:43) ~[JobsReborn-PatchPlaceBreak-3.0.0.jar:?]
at fr.djaytan.mc.jrppb.spigot.adapter.converter.ActionTypeConverter.convert(ActionTypeConverter.java:39) ~[JobsReborn-PatchPlaceBreak-3.0.0.jar:?]
at fr.djaytan.mc.jrppb.spigot.adapter.PatchPlaceBreakSpigotAdapterApi.isPlaceAndBreakExploit(PatchPlaceBreakSpigotAdapterApi.java:150) ~[JobsReborn-PatchPlaceBreak-3.0.0.jar:?]
at fr.djaytan.mc.jrppb.spigot.listener.jobs.JobsExpGainListener.patchOnJobsExpGain(JobsExpGainListener.java:62) ~[JobsReborn-PatchPlaceBreak-3.0.0.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1141.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-196]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-196]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-196]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at com.gamingmesh.jobs.Jobs.action(Jobs.java:1273) ~[Jobs5.2.2.3.jar:?]
at com.gamingmesh.jobs.Jobs.action(Jobs.java:971) ~[Jobs5.2.2.3.jar:?]
at com.gamingmesh.jobs.listeners.JobsPaymentListener.onPlayerInteract(JobsPaymentListener.java:1768) ~[Jobs5.2.2.3.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor902.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-196]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-196]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-196]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:591) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:537) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:2015) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:37) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.a(ServerboundUseItemOnPacket.java:9) ~[?:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-196]
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:1338) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1315) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1308) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1286) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[paper-1.20.1.jar:git-Paper-196]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]

Expected behavior

When performing unsupported job action types, no error shall be reported in the server logs.

Steps to reproduce

On a Spigot server (or any fork like PaperMC) having the JobsReborn-PatchPlaceBreak Spigot plugin installed:

  1. Plant carrots
  2. Use bone meals to make them grow quicker
  3. Collect them An exception stack trace is expected to be printed in the server logs.

Other

This bug has been detected and reported by the user "uamsyu" on the Spigot plugin marketplace space, under the "Discussion" tab: https://www.spigotmc.org/threads/jobsreborn-patchplacebreak-addon.561392/page-3.

github-actions[bot] commented 9 months ago

:tada: This issue has been resolved in version 3.0.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: