EssentialsX

EssentialsX

2M Downloads

item spawn blacklist IDs

aeyu opened this issue ยท 15 comments

commented

Information

Full output of /ess version:

Server version : 1.13.2-R0.1-SNAPSHOT git-paper-492 (MC: 1.13.2)
EssentialsX version: 2.16.0.16
LuckPerms version: 4.3.64
Vault version: 1.7.1-b91
EssentialsXProtect version: 2.16.0.16
EssentialsXChat version: (same for Chat, GeoIP, AntiBuild, Spawn and XMPP)

Server log:

https://gist.github.com/aeyu/5c7f0139419bee6fad87e96a92a9e67b

EssentialsX config

https://gist.github.com/aeyu/40d6f64538ea7ff79a5d277579deea5f

Help request

Problem
Basically, this :
"[16:37:20] [Server thread/ERROR]: [Essentials] Unknown item 7 in item-spawn-blacklist list."
Essentials doesn't recognise numeral item IDs in item-spawn-blacklist.

What I have tried
Changing value to bedrock, BEDROCK and even minecraft:bedrock.
Same problem.

Screenshots
Nothing really relevant.
I can add if you ask.

commented

As of Essentials 2.16, support for numerical item ID has been dropped. Instead, you must use full item names.

Your server log and your config both report you're still using numerical item IDs in the configuration. Have you tried completely closing the server, changing the IDs to item names, saving, and then restarting?

commented

changing the IDs to item names

You mean insert bedrock/BEDROCK/minecraft:bedrock in place of 7 in item-spawn-blacklist ?
Of course.
Wanna see logs ?

PS : if the issue is related to that then config.yml shall be changed to not suggest to add numeral item ID in item-spawn-blacklist

commented

The logs you provided show that the config is still using numerical IDs on server startup.

Yes, I'd like some logs with the proper item names.

commented

Here we go with bedrock :

[18:01:24] [Server thread/ERROR]: [Essentials] Unknown item bedrock in item-spawn-blacklist list.

log https://gist.github.com/aeyu/e3bb270354792bc3439c7621be49f899
conf https://gist.github.com/aeyu/e1efeba8ff8dc5ec37a95fef6ded597d

PS : When I said

if the issue is related to that then config.yml shall be changed to not suggest to add numeral item ID in item-spawn-blacklist

It's related to this in config.yml :

What to prevent from /item and /give.
e.g item-spawn-blacklist: 10,11,46
item-spawn-blacklist:

commented

Looking at the code in FlatItemDb.java.get and FlatitemDb.getByName, and judging by your log* one might guess that the problem is Essentials attempts to check for blacklisted items before** it loads the items.json file, therefore any item specified will create an exception.


  1. (the exceptions (line 191) occur before [Essentials] Loaded 17746 items from items.json. is printed to the console (line 209))
  2. (the stacktrace shows Settings._getItemSpawnBlacklist before Settings.reloadConfig)
commented

Thanks !
But what should I do to solve it?
(Sorry I'm no dev :/)

commented

we'll have to wait for confirmation from a developer who knows what they're doing, then see if they're willing to fix it or if someone needs to open a pull request to fix it.

commented

New issue !
Per suggestion of #2347 (comment) I removed items.json to allow a new file to be created.

items number from items.json then switched from 17746 to 18410.
Also, I've noticed that something appeared between
[Server thread/INFO]: [EssentialsAntiBuild] Enabling EssentialsAntiBuild v2.16.0.16
and
[Server thread/INFO]: [EssentialsSpawn] Enabling EssentialsSpawn v2.16.0.16

[EssentialsAntiBuild] Enabling EssentialsAntiBuild v2.16.0.16
[Essentials] Unknown item LAVA in protect.alert.on-placement list.
[Essentials] Unknown item LAVA in protect.blacklist.placement list.
[EssentialsSpawn] Enabling EssentialsSpawn v2.16.0.16

commented

[Essentials] Unknown item LAVA in protect.blacklist.placement list.

makes sense, seeing as item.json does not contain any entry titled "lava". is there anywhere that lava is specifically mentioned in a config file?

commented

[Essentials] Unknown item LAVA in protect.blacklist.placement list.

makes sense, seeing as item.json does not contain any entry titled "lava". is there anywhere that lava is specifically mentioned in a config file?

Yeah in default config.yml (in mine too btw) ;-) :
https://github.com/EssentialsX/Essentials/blob/2.x/Essentials/src/config.yml

alert:
on-placement: LAVA,TNT,LAVA_BUCKET

and

blacklist:

# Which blocks should people be prevented from placing?
placement: LAVA,TNT,LAVA_BUCKET
commented

items.json doesn't include non-spawnable materials any more. This could be reverted, but we should also check with the Bukkit Materials before giving up.

commented

Both blocks not working in protect lists and items failing to be recognised in item-spawn-blacklist should now be resolved.

@aeyu Could you update to the latest build and delete your items.json file again, and see if the errors still occur?

commented

@aeyu Could you update to the latest build and delete your items.json file again, and see if the errors still occur?

@md678685 Of course. I did NOT rm config.yml btw (do I need ?).
logs : https://gist.github.com/aeyu/7f224fe167ed42ba763bbcc902053a6e
conf : https://gist.github.com/aeyu/4671ca13d8fa72336588f590894ed462

[Server thread/ERROR]: [Essentials] Unknown item LAVA in protect.alert.on-placement list.
[Server thread/ERROR]: [Essentials] Unknown item LAVA in protect.blacklist.placement list.

commented

I've pushed a fix for this - grab the latest build from the build server.

edited: I posted the wrong comment here

commented

@aeyu Apologies for the delay in responding to this.

After looking into it, I believe the reason for those last couple of errors is that the new item database code doesn't allow spawning in stacks that aren't items, but the config tries to spawn in those items in order to figure out what their material is. I'm working on a fix for this which involves changing how the item databases work, but for now you can ignore this message.

Edit: I've created a partial fix for this at #2431 - this should be merged soon.