EssentialsX / Essentials

The modern Essentials suite for Spigot and Paper.
https://essentialsx.net
GNU General Public License v3.0
1.96k stars 980 forks source link

Essentials signs do not support item metadata #81

Open devioursoul opened 9 years ago

devioursoul commented 9 years ago

Hello,

I made a short video to explain my issue to prevent confusion.

https://www.youtube.com/watch?v=5zoFoWinco0

If you prefer not to watch it I will explain it here.

I am using the EssentialsX-2.0.1.jar plugin and Silkspawners(amongst a few others) 12345

When I use the [buy] sign to buy spawners with EssentialsX-2.0.1.jar in combination with silkspawners it works fine, and using the [sell] sign instantly after will sell it.

However.....

When placing the spawner and picking it up with a silktouch pickaxe, and than trying to sell it back I get the error "Error:You do not have 1x mobspawner"

I have read that multiple people / servers have this issue so I am not sure if it can be "fixed". but if anyone can do it it's going to be you guys :)

Of course if this is sorted I will make a small compensation for the support given.

devioursoul commented 9 years ago

It's just walking, nothing more. It doesn't add anything to the video.

devioursoul commented 9 years ago

any help would be appreciated.

drtshock commented 9 years ago

We currently don't support all the metadata in sell signs, only buy signs.

devioursoul commented 9 years ago

Fair enough, thank you for responding. can I expect this in the future ?

Thx.

drtshock commented 9 years ago

Yes in the future.

devioursoul commented 9 years ago

ok awesome, this can be closed than.

drtshock commented 9 years ago

No because it's not added yet :)

JRoy commented 3 years ago

Current pathways of implementation of this are as follows;

All versions - item name should have a asterisk next to it indicating that the item is not just the base item and has specific metadata attached to it. A new command like /signinfo with aliases of /(sell|trade|buy)info would give specific metadata information. We could also allow a custom name of the item since we're serializing data anyway.

Storage Solutions;

For 1.14+, PersistentDataContainer is the ideal solution. Simple and we don't need reflection.

For below 1.14 the idea is to literally just copy paste the way PersistentDataContainer serializes to NBT