Summary
Want to create custom enchantments like those of minecraft vanilla? This plugin is for you.
EnchantmentAPI allows you to:
- Create custom enchantments
- Set enchantment's name, id, trigger ...
- Create custom enchantment effect
Installation
Put the file in your plugin folder.
To import the API, add it to your build path (like bukkit) and add this line in your plugin.yml:
depend: EchantmentAPI
Usage
To create custom enchantment, use CustomEnchantment class.
Constructors:
new CustomEnchantment(int id, String name, int lvl, EnchantmentTarget target)
new CustomEnchantment(int id, String name, int lvl, EnchantmentTarget target, int start, boolean cursed, boolean treasure, List<Enchantment> conf, EventTrigger eventtrigger boolean visible)
You can also create a file that extends the CustomEnchantment class:
public class MyEnchant extends CustomEnchantment{
public MyEnchant(int id, String name, int lvl, EnchantmentTarget target, int start, boolean cursed, boolean treasure, List<Enchantment> conf, EventTrigger eventtrigger, boolean visible) {
super(id, name, lvl, target, start, cursed, treasure, conf, damagetrigger, eventtrigger, visible); // TODO Auto-generated constructor stub }
@Override
public void enchantmentEffect(Event event, int lvl) {
// TODO Auto-generated method stub
}
}
Supported events:
EntityDamageEvent, EntityDamageByEntityEvent, EntityDamageByBlockEvent, EntityAirChangeEvent, EntityCombustEvent, PlayerFishEvent, PlayerAnimationEvent, PlayerDeathEvent, BlockBreakEvent
Register custom enchantment:
EnchAPI.loadEnchantment(CustomEnchantment)
Set enchantment effect:
public void enchantmentEffect(Event event, int lvl) {
//TODO Enchantment effect here
}
Enchant an item:
YourEnchantment.enchant(ItemStack item, int level)Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta