patrick-layden / HyperConomy

https://dev.bukkit.org/projects/hyperconomy
GNU General Public License v3.0
35 stars 24 forks source link

Enchantments #88

Open DKrolls opened 8 years ago

DKrolls commented 8 years ago

When buying an enchantment from a store, it will apply the item to whatever the player is holding. This is a problem on my server, as people can use it to get say, Fire Aspect II boots. Can you please make an option to allow enchantments to only be applied to books? I really appreciate your plugin and dedication. Thank you.

remremrem commented 8 years ago

Is this happening using the /buy command, or using the HyperMerchant shop menu?

RealSmileyguy commented 8 years ago

This is with /buy. I do not have HyperMerchant installed.

patrick-layden commented 8 years ago

Bukkit/Spigot should be preventing impossible enchanted items from being created. Are you running Spigot? I can look into a toggle to disable non-book enchantments, but can't players just apply the enchantment from the book to an item anyway? Is there any difference?

DKrolls commented 8 years ago
  1. Yes, I am running spigot.
  2. One of the moderators on my server ran a series of tests. According to him, "Enchantments can be removed from any item including books, weapons, armor and tools. These same enchantments can be added back to any item (appropriate or not). For example, I just created boots with both both Prot and Proj Prot. (This is game breaking)" According to the Minecraft wiki, "Fire Protection, Blast Protection, Projectile Protection and Protection are mutually exclusive." This could also be used to "farm" enchantments from wood/stone tools before re-adding them to diamond. Further tests also indicated that "Adding or removing an enchant from an item completely removes the "RepairCost" NBT tag. This means adding even a useless level 1 enchant then removing it allows you to completely refresh the cost (and subsequent number of repairs) for items. To test, I took one of my retired silk picks with a repair cost of 63 and added then removed fire aspect 2. I was then able to repair my silk pick for a cost of 2." Not only was he able to add FA II to a pickaxe, it reset the number of levels needed to repair it.
  3. The difference between applying an Unbreaking III book to a pickaxe and adding it onto the pick directly from the store is the enchantment cost. Adding a book requires several levels of XP, whereas adding it directly from a shop requires zero. This may not be a big deal on other servers, but I would appreciate the ability to toggle buying books only to avoid this situation.

Finally, thank you very much for providing this wonderful plugin for the Minecraft community. I know my players enjoy it and am certain that we are not alone in our satisfaction.