EssentialsX

EssentialsX

2M Downloads

kitcreate returns null for shields

SirKratosAurion opened this issue ยท 10 comments

commented

Information

Full output of /ess version:/ess

[13:25:25 INFO]: Server version: 1.13.1-R0.1-SNAPSHOT git-Spigot-6b015b4-a222e4a (MC: 1.13.1)
[13:25:25 INFO]: EssentialsX version: 2.15.0.45
[13:25:25 INFO]: LuckPerms version: 4.2.98
[13:25:25 INFO]: Vault version: 1.7.1-b91
[13:25:25 INFO]: EssentialsXGeoIP version: 2.15.0.45
[13:25:25 INFO]: EssentialsXChat version: 2.15.0.45
[13:25:25 INFO]: EssentialsXSpawn version: 2.15.0.45

image

Server log (upload logs/latest.log to Gist):

No log output

EssentialsX config (upload plugins/Essentials/config.yml to Gist):

Default Config

Details

Essentials is unable to handle /kitcreate when you have a shield in the kit. I was looking to add a shield with a banner.

commented

@Sandtato Sorry to ask again, but does this still occur on the latest experimental build with items support added?

commented

I can still replicate this:

[16:58:46 INFO]: CONSOLE issued server command: /ess version
[16:58:46 INFO]: Server version: 1.13.2-R0.1-SNAPSHOT git-Paper-487 (MC: 1.13.2)
[16:58:46 INFO]: EssentialsX version: 2.16-pre1.14
[16:58:46 INFO]: LuckPerms version: 4.3.58
[16:58:46 INFO]: Vault version: 1.7.1-b91
[16:58:46 INFO]: EssentialsXProtect version: 2.16-pre1.14
[16:58:46 INFO]: EssentialsXSpawn version: 2.16-pre1.14
[16:58:46 INFO]: EssentialsXChat version: 2.16-pre1.14
[16:58:46 INFO]: EssentialsXGeoIP version: 2.16-pre1.14
[16:58:46 INFO]: EssentialsXAntiBuild version: 2.16-pre1.14
[16:58:46 INFO]: EssentialsXXMPP version: 2.16-pre1.14
[16:58:52 INFO]: [Essentials] checking if MD678685 has essentials.give - true
...
[16:58:55 INFO]: MD678685 issued server command: /give MD678685 shield 1
[16:58:55 INFO]: [Essentials] checking if MD678685 has essentials.mail - true
[16:58:55 INFO]: [Essentials] checking if MD678685 has essentials.give - true
[16:58:55 INFO]: [Essentials] checking if MD678685 can afford charge.
[16:58:55 INFO]: [Essentials] calculated command (give) cost for MD678685 as 0
[16:58:55 INFO]: [Essentials] checking if MD678685 has essentials.itemspawn.exempt - false
[16:58:55 INFO]: [Essentials] checking if MD678685 has essentials.vanish.interact - true
[16:58:55 INFO]: [Essentials] checking if MD678685 has essentials.oversizedstacks - true
[16:58:55 INFO]: [Essentials] attempting to charge user MD678685
[16:58:55 INFO]: [Essentials] calculated command (give) cost for MD678685 as 0
[16:58:55 INFO]: [Essentials] charge user MD678685 completed
[16:58:59 INFO]: [Essentials] checking if MD678685 has essentials.createkit - true
...
[16:59:02 INFO]: MD678685 issued server command: /kitcreate test 1
[16:59:02 INFO]: [Essentials] checking if MD678685 has essentials.mail - true
[16:59:02 INFO]: [Essentials] checking if MD678685 has essentials.createkit - true
[16:59:02 INFO]: [Essentials] checking if MD678685 can afford charge.
[16:59:02 INFO]: [Essentials] calculated command (createkit) cost for MD678685 as 0
[16:59:02 INFO]: [Essentials] Error calling the command /kitcreate
java.lang.NullPointerException: null
        at com.earth2me.essentials.items.AbstractItemDb.serialize(AbstractItemDb.java:221) ~[?:?]
        at com.earth2me.essentials.commands.Commandcreatekit.run(Commandcreatekit.java:66) ~[?:?]
        at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:157) ~[?:?]
        at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:534) ~[?:?]
        at com.earth2me.essentials.Essentials.onCommand(Essentials.java:447) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[patched_1.13.2.jar:git-Paper-487]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[patched_1.13.2.jar:git-Paper-487]
        at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchCommand(CraftServer.java:732) ~[patched_1.13.2.jar:git-Paper-487]
        at net.minecraft.server.v1_13_R2.PlayerConnection.handleCommand(PlayerConnection.java:1792) ~[patched_1.13.2.jar:git-Paper-487]
        at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1595) ~[patched_1.13.2.jar:git-Paper-487]
        at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[patched_1.13.2.jar:git-Paper-487]
        at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.13.2.jar:git-Paper-487]
        at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:12) ~[patched_1.13.2.jar:git-Paper-487]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_181]
        at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_181]
        at net.minecraft.server.v1_13_R2.SystemUtils.a(SystemUtils.java:109) ~[patched_1.13.2.jar:git-Paper-487]
        at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1016) ~[patched_1.13.2.jar:git-Paper-487]
        at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:439) ~[patched_1.13.2.jar:git-Paper-487]
        at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:943) ~[patched_1.13.2.jar:git-Paper-487]
        at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:841) ~[patched_1.13.2.jar:git-Paper-487]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_181]

I need to overhaul AbstractItemDb.serialize - it still uses enums not MaterialUtil. The new method could also move to MetaItemStack where the matching deserialization method is already located.

commented

Update: This also occurs with banners.

commented

I've now made changes to how AbstractItemDb serialises items, but I haven't had the opportunity to test this yet - could you test this on the latest experimental build?

commented

@md678685 Issue seems to be resolved on latest build.

commented

Closing as this appears to be resolved. If this is still occuring, please respond and I'll reopen the issue.

commented

Please run /ess debug, then repeat the issue and post the console output.

commented

Can confirm this issue on Paper version git-Paper-366 (MC: 1.13.1) also running EssentialsX 2.15.0.45. Below is console output:

[00:36:02] [Server thread/INFO]: Morphtato issued server command: /createkit test 10
[00:36:02] [Server thread/INFO]: [Essentials] checking if Morphtato has essentials.mail - true
[00:36:02] [Server thread/INFO]: [Essentials] checking if Morphtato has essentials.createkit - true
[00:36:02] [Server thread/INFO]: [Essentials] checking if Morphtato can afford charge.
[00:36:02] [Server thread/INFO]: [Essentials] calculated command (createkit) cost for Morphtato as 0
[00:36:02] [Server thread/INFO]: [Essentials] Error calling the command /createkit
java.lang.NullPointerException: null
	at com.earth2me.essentials.ItemDb.serialize(ItemDb.java:417) ~[?:?]
	at com.earth2me.essentials.commands.Commandcreatekit.run(Commandcreatekit.java:66) ~[?:?]
	at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:157) ~[?:?]
	at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:522) ~[?:?]
	at com.earth2me.essentials.Essentials.onCommand(Essentials.java:435) ~[?:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[patched_1.13.1.jar:git-Paper-366]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:151) ~[patched_1.13.1.jar:git-Paper-366]
	at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchCommand(CraftServer.java:729) ~[patched_1.13.1.jar:git-Paper-366]
	at net.minecraft.server.v1_13_R2.PlayerConnection.handleCommand(PlayerConnection.java:1743) ~[patched_1.13.1.jar:git-Paper-366]
	at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1547) ~[patched_1.13.1.jar:git-Paper-366]
	at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[patched_1.13.1.jar:git-Paper-366]
	at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.13.1.jar:git-Paper-366]
	at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:12) ~[patched_1.13.1.jar:git-Paper-366]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_181]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_181]
	at net.minecraft.server.v1_13_R2.SystemUtils.a(SystemUtils.java:109) ~[patched_1.13.1.jar:git-Paper-366]
	at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1016) ~[patched_1.13.1.jar:git-Paper-366]
	at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:434) ~[patched_1.13.1.jar:git-Paper-366]
	at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:943) ~[patched_1.13.1.jar:git-Paper-366]
	at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:841) ~[patched_1.13.1.jar:git-Paper-366]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181] 
commented

@marvinej @Sandtato Can you replicate this using the latest experimental build?

commented

@md678685 Can replicate this error on dev-27.86 as well. Attached is my server configuration:

vqi78ul