Releases: Jaconp/SpigotAPIs
1.4.2
1.4.1
1.4
Updated to 1.4
Newest addition!
EnchantListenerImpl
Listens for certain events and runs methods that you can override! It also checks if the entity in the event is a player and if the item in the player's main hand contains the enchantment.
These are the methods that it has so far:
onBlockBreak(BlockBreakEvent)
onBlockDropItem(BlockDropItemEvent)
onEntityDamageByPlayer(Player, EntityDamageByEntityEvent)
onPlayerShootBow(Player, EntityShootBowEvent)
onConsume(PlayerItemConsumeEvent)
onInteract(PlayerInteractEvent)
Let me know if you want other events to be included! Please also state how can custom enchantments use the events.
EnchantBuilder
Added canEnchant(Material...) which sets which materials that can be enchanted instead of repeatedly using itemstack#getType#equals.
EnchantUtil
Added hasEnchantMainHand(Player, Enchantment) which checks if the item in the player's main hand has the specified enchantment.
1.3.1
1.3
Updated to 1.3
More improvements!
EnchantBuilder
- Build method now does not require the plugin instance. If you want to use the Minecraft namespace for your enchantment, set the boolean in the constructor to true.
- Conflicts method now only accepts a enchantment array instead of a function. I can't find any use cases where the function is required.
- There is now a setLevelRange(int,int) method which takes the first parameter as the start level and the second parameter as the max level.
EnchantUtil
- Removed getDefaultEnchants method and replaced it with a public set that automatically adds the default Minecraft Enchantments.
Thanks @MrFishCakes and OMGitzFROST on SpigotMC for their contributions!
1.2.2
1.2.1
1.2
Added the following features:
- The enchant listener automatically applys the lore when a player enchants using an Enchantment table.
- New CommandManager to help register commands without using the plugin.yml. Just extend the class.
- Added SubCommand and CommandUtil.
- Added PlayerUtil which has useful functions for both Players and OfflinePlayers.