Can't change shop-creation-item
JohnDelisle opened this issue ยท 4 comments
Hi there - I'm trying to change the item from a villager spawn egg to a golden hoe.
I've changed the following:
shop-creation-item: "GOLDEN_HOE"
shop-creation-item-data: 0
shop-creation-item-name: ""
shop-creation-item-lore: []
shop-creation-item-spawn-egg-entity-type: ""
prevent-shop-creation-item-regular-usage: false
deleting-player-shop-returns-creation-item: true
Even after restarting the server, it will not allow me to use a Golden Hoe, and if I hold a Villager spawn egg, it sends instructions to the chat window on how to use the Villager egg to create a shop.
Running 1.12.2 Spigot, with GriefPrevention and dynmap.
The correct item material name is "GOLD_HOE"
You can find all valid material names here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
Something else you might run into when using a tool a shop-creation item:
Currently with the way you have configured it, it will only allow golden hoes with data value 0, meaning only undamaged golden hoes will work. If you want to allow any golden hoe, you can change the item-data value to -1.
However, due to 'deleting-player-shop-returns-creation-item' being enabled: Your players will get back a fully undamaged golden hoe when they remove the shopkeeper again. So if you accept any golden hoe for creation, your players can basically abuse it to repair their golden hoes with your setup. There is no way of giving them back exactly the item the shop was created with (the plugin doesn't store the item the shop was created with, it creates a new item).
Thanks for your help - that makes a lot of sense now.
I'm thinking I'll use a feather instead. I tested with that, and it worked as expected.
Just a suggestion - Even with debug enabled, there is no warning that the "golden_hoe" is an invalid item, and it just falls back on the villager egg. I'm thinking you can avoid reports like this in the future by logging that it was an invalid item, and maybe even been providing that link you mentioned.
Thanks again, nice plugin!