OldCombatMechanics

OldCombatMechanics

46.1k Downloads

PaperSpigot returning null instead of AIR

AsVaidas opened this issue ยท 4 comments

commented

Info

  • Server version: 1.13.2
  • OldCombatMechanics version: 1.6.6
  • Server log file:
    latest.zip

WIth newest test version:
moreErrors.zip

  • OldCombatMechanics config file:

config.zip

Problem Description

Errors in console

commented

Duplicate

This issue looks like a duplicate of #229.

Resolution

Please try a newer version of the plugin. You can find a semi-dev build on the Jenkins server here.

Stacktrace

[16:36:01] [Server thread/ERROR]: Could not pass event PlayerQuitEvent to OldCombatMechanics v1.6.6
org.bukkit.event.EventException: null
	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:72) ~[patched_1.13.2.jar:git-Paper-481]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.13.2.jar:git-Paper-481]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.13.2.jar:git-Paper-481]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:513) ~[patched_1.13.2.jar:git-Paper-481]
	at net.minecraft.server.v1_13_R2.PlayerList.disconnect(PlayerList.java:429) ~[patched_1.13.2.jar:git-Paper-481]
	at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1470) ~[patched_1.13.2.jar:git-Paper-481]
	at net.minecraft.server.v1_13_R2.NetworkManager.handleDisconnection(NetworkManager.java:359) ~[patched_1.13.2.jar:git-Paper-481]
	at net.minecraft.server.v1_13_R2.ServerConnection.c(ServerConnection.java:154) ~[patched_1.13.2.jar:git-Paper-481]
	at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1129) ~[patched_1.13.2.jar:git-Paper-481]
	at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:439) ~[patched_1.13.2.jar:git-Paper-481]
	at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:943) ~[patched_1.13.2.jar:git-Paper-481]
	at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:841) ~[patched_1.13.2.jar:git-Paper-481]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Caused by: java.lang.IllegalStateException: Unable to find method getTypeId ([]).
	at com.comphenix.example.NbtFactory.getMethod(NbtFactory.java:356) ~[?:?]
	at com.comphenix.example.NbtFactory.<init>(NbtFactory.java:54) ~[?:?]
	at com.comphenix.example.NbtFactory.get(NbtFactory.java:83) ~[?:?]
	at com.comphenix.example.NbtFactory.getCraftItemStack(NbtFactory.java:207) ~[?:?]
	at com.comphenix.example.Attributes.<init>(Attributes.java:22) ~[?:?]
	at gvlfm78.plugin.OldCombatMechanics.module.ModuleOldArmourStrength.apply(ModuleOldArmourStrength.java:46) ~[?:?]
	at gvlfm78.plugin.OldCombatMechanics.module.ModuleOldArmourStrength.setArmourAccordingly(ModuleOldArmourStrength.java:197) ~[?:?]
	at gvlfm78.plugin.OldCombatMechanics.module.ModuleOldArmourStrength.setArmourToDefault(ModuleOldArmourStrength.java:177) ~[?:?]
	at gvlfm78.plugin.OldCombatMechanics.module.ModuleOldArmourStrength.onPlayerLeave(ModuleOldArmourStrength.java:165) ~[?:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor153.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) ~[patched_1.13.2.jar:git-Paper-481]
	... 12 more

commented

With newest test version:
moreErrors.zip
(I was just adding this to the main post and you commented)

commented

Hm. That would mean that Paper chooses to return null and not AIR for the item in the main hand of the damager and not null.

Can you try this version?
OCM.zip

commented

Works, thanks