EssentialsX

EssentialsX

2M Downloads

/i errors out on versions below 1.13

triagonal opened this issue · 2 comments

commented

Originally reported by Fix3d#1930 on Discord.

Problem replicated on 1.8.8, 1.9.4, 1.10.2, 1.11.2 with same results. Using 1.8.8 results for reporting purposes.

Information

Full output of /ess version:

[00:21:40 INFO]: CONSOLE issued server command: /ess version
[00:21:40 INFO]: Server version: 1.8.8-R0.1-SNAPSHOT git-PaperSpigot-"4c7641d" (MC: 1.8.8)
[00:21:40 INFO]: EssentialsX version: 2.16.1.214

Server log: https://gist.github.com/triagonal/f7360212dcaaf484c91e780d636bf0be

EssentialsX config: default config - no changes

Details

Description
On versions below 1.13, using /i with an item id or item name will cause an error, only returning null and throwing an NPE (when debug is enabled)

error: https://gist.github.com/triagonal/81cfca9c4f602c9a47205c8156f5ff91

Steps to reproduce

  1. Use clean paper/spigot server on a version below 1.13 with latest essx installed
  2. Attempt to use, for example, /i 1 or /i with any other argument

Expected behavior
/i gives the requested item and doesn't error out

commented

Changes to LegacyItemDb: https://github.com/EssentialsX/Essentials/commits/2.x/Essentials/src/com/earth2me/essentials/items/LegacyItemDb.java

Comparing the stack trace to ItemStack's source code, it looks like a null material is being passed in, causing a NPE when Bukkit tries to get its ID (line 68).

e230cee doesn't seem to include any changes that would cause this. It's possible 9e73c29 caused this instead?

Edit: alternatively there could be something funky about the 1.14 changes that causes this?

commented

This has now been fixed - you can download the latest version from the download page.