EnchantmentBox is a plugin that provides 10+ custom enchantments to the game. It includes a configurable enchanting system, and most enchantments work while being used by mobs.
The video below showcases a few enchantments:
EnchantmentBox uses StarAPI. StarAPI is another plugin of mine, where I put everything useful in more than one plugin.
- Launch x - Launches x (x is a projectile)
- Barrage - Launches additional projectiles whenever a projectile is launched from the enchanted item
- Encase x - When attacked by an item enchanted with Encase x, the victim will be surrounded by x (x is a block)
- Fire Thorns - While wearing an item with this enchantment, any attackers will be set on fire
- Ender Thorns - While wearing an item with this enchantment, any attackers will be teleported around randomly
- Explosion - Creates an explosion when the item is used to attack something
- Ninja - When an attacker kills something using a ninja enchanted weapon, it becomes invisible and gains speed
- Steal - When hit with a steal enchanted weapon, the attacker has the chance to ‘steal’ the item that the victim is holding
- Teleport - When hit with a teleport enchanted weapon, the victim will be teleported around randomly
- Thunder - When hit with a thunder enchanted weapon, the victim will be repeatedly struck by lightning
- Potion - There is an enchantment registered for every single potion type. When hit with a potion enchanted weapon, the victim will receive the potion effect.
To access the enchantment system, run the command “/enchantbox enchant.”
A menu of all enchantments should pop up, within that menu, you can enchant or upgrade enchantments on your item.
Launch enchantment is not functional (This is a Sponge implementation bug, wherein launch projectile does not use the proper Cause- this should be fixed in the most recent Sponge build)
- Barrage enchantment is not functional (This is a Sponge implementation bug, wherein LaunchProjectileEvent is not implemented)
- Steal enchantment is not functional (This is a Sponge implementation bug, wherein Equippable’s methods are not implemented yet)
/enchantbox enchant - opens the enchanting menu (perm: enchantbox.enchant)
/star enchant clear - clears enchantments on the item you’re holding (perm: star.enchantments.enchant)
/star enchant enchant - enchants the item you;re holding (perm: star.enchantments.enchant)
/star enchant list - lists all enchantments registered
##How It Works
StarAPI holds the custom enchantment API, and EnchantmentBox utilizes it. The enchantment API has two elements, event processors and enchantment handlers. Enchantment handlers, obviously enough, handle enchantments, and function as doctored event listeners. Event processors are responsible for taking raw sponge events, and determining what enchantments are associated with what entities in the event.
##For The Judges
StarAPI, as aforementioned, is my own plugin framework. Within it, I throw all sorts of useful code. While creating EnchantmentBox, I realized that and enchantment API would be useful in more places then this plugin, so I transferred it to StarAPI. (In fact, the enchantment commit to Star and the initial commit to EnchantmentBox occurred on the same day). I know the rules specify that dependencies shall not be judged, but I was hoping the judges wouldn’t mind taking a look at the enchantment api in Star. In addition, the menu api in star was developed specifically for the purpose of displaying enchantments to the player.