OldCombatMechanics

OldCombatMechanics

46.1k Downloads

NPE when sword blocking

Kamilkime opened this issue ยท 6 comments

commented

Info

  • Server version: 1.13.2
  • OldCombatMechanics version: 1.6.6
  • Server log file: error given below
  • OldCombatMechanics config file: https://pastebin.com/FRXmG3qs

Problem Description

[22:49:02] [Server thread/ERROR]: Could not pass event PlayerItemHeldEvent to OldCombatMechanics v1.6.6
org.bukkit.event.EventException: null
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:309) ~[spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) ~[spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) ~[spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1408) ~[spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at net.minecraft.server.v1_13_R2.PacketPlayInHeldItemSlot.a(SourceFile:30) ~[spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at net.minecraft.server.v1_13_R2.PacketPlayInHeldItemSlot.a(SourceFile:8) ~[spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.a(SourceFile:10) ~[spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_191]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_191]
	at net.minecraft.server.v1_13_R2.SystemUtils.a(SourceFile:199) [spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:896) [spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:417) [spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:831) [spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:729) [spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Caused by: java.lang.NullPointerException
	at gvlfm78.plugin.OldCombatMechanics.module.ModuleSwordBlocking.postponeRestoring(ModuleSwordBlocking.java:258) ~[?:?]
	at gvlfm78.plugin.OldCombatMechanics.module.ModuleSwordBlocking.restore(ModuleSwordBlocking.java:244) ~[?:?]
	at gvlfm78.plugin.OldCombatMechanics.module.ModuleSwordBlocking.onHotBarChange(ModuleSwordBlocking.java:95) ~[?:?]
	at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:305) ~[spigot-1.13.2.jar:git-Spigot-f56e2e7-7fc66b2]
	... 15 more
commented

Please try the latest test build and see if the issue is still present.

commented

For some reason, when players block their sword they get kicked for "you must pass a 'packet' object!"

I have no idea if this issue is even related to this one or even this plugin. Any help would be appreciated though.

commented

@Leomelonseeds Anything else? Maybe a stacktrace (long message with lots of "at org.bukkit...." or something similiar)? What happens when you enable debug in the server.properties?

commented

There is no stacktrace. The kick message is here: https://gyazo.com/bab57e82bc40ab52ca1df94ffd286e83

I've been having this issue for ages, if you can pinpoint what causes this, it would be much appreciated :D

commented

@Leomelonseeds Are you sure this is the same issue as the original one above?

commented

You're right it's probably not. I'll open a new issue later