Skip to content

Releases: Jaconp/SpigotAPIs

1.4.2

03 Jul 09:37
1c31476
Compare
Choose a tag to compare

Changed function to predicate.

1.4.1

03 Jul 09:31
c02a65c
Compare
Choose a tag to compare

Added the import statement for PlayerInteractEvent which I completely forgot about.

1.4

03 Jul 09:29
b568940
Compare
Choose a tag to compare
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

26 Jun 03:49
b4f46d0
Compare
Choose a tag to compare

Fixed conflict method.

1.3

25 Jun 11:07
060da0f
Compare
Choose a tag to compare
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

18 Jun 03:35
1445d97
Compare
Choose a tag to compare

The enchantment lore is now automatically added when an item is enchanted via an enchantment table. Does not conflict with other enchant listeners.

1.2.1

18 Jun 02:45
ce3a46d
Compare
Choose a tag to compare

Fixed a bug where the applyEnchant method thinks that all registered enchantments are default enchantment.

1.2

17 Jun 08:51
7c47e3e
Compare
Choose a tag to compare
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.

1.1

13 Jun 04:22
6462cd9
Compare
Choose a tag to compare
1.1

Fixed bug in EnchantBuilder.

1.0

11 Jun 13:13
7574778
Compare
Choose a tag to compare

This is the first release.