I gave this project up, when I found out that the anvil result slot is untouchable from the server and 100% client side.
EnchantControl
This plugin lets you control enchant through enchanting tables and anvils and modify the vanilla mechanics
What this plugin does
- Allow you to control the maximum enchantment level and number of bookshelfs needed for it
- Allow you to remove enchantments completely
- Allow you to change the maximum level of enchantments
- Allow you to change the probability of enchantments dependant to the level
- Allow you to change the costs for anvil use
- Allow you to disable the renaming of items with an anvil
- Allow you to define the maximum levels of enchantments with anvils
How to use this plugin
This plugin replaces the vanilla enchantment calculation with the one defined in the config by yourself. So in order to get this plugin to work just drop it in your plugins folder and specify every item in the config to your needs (How? See config section).
Config
- maxEnchantingLevel: Maximum level an item can be enchanted with in an enchanting table (vanilla is 30, used to be 50)
- first-,second-,thirdEnchantLevel: Define the level the 3 tabs in the enchanting table are going to be as formula (use <level> for the players current level)
- sword-,tool-,bowEnchantments: A list of all enchantments that swords/tools/bows can get
- sword-,tool-,bowMaxEnchantments: The maximum amount of enchantments swords/tools/bows can get
- materialModifier~ (~ is the material; e.g.: materialModifierWood): Specific modifier of a material (used in the probability for enchantments)
- Probability(~ is enchantment name; e.g.: silktouchProbability): Probability for the specific enchantment (use 'mm' (without ' ') as the MaterialModifier and <level> as the levels the player invested for this enchant) as formula
- maxAnvilLevel: Maximum xp levels that can be used in an anvil (vanilla is 39)
- renameCost: Cost for renaming an item (in xp level)
- renameItems: Whether items can be renamed (true or false)
- Price(~ is enchantment name; e.g.: silktouchPrice): Price of keeping an enchantment in the anvil in levels (use <enchantlevel> for the level of the enchantment)
- Price(~ is the material; e.g.: woodPrice): Price for repairing / combining a specific material in level
Source
The source can be found in the jar in the folder 'src'.