Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.
MSWS edited this page Jan 20, 2019 · 2 revisions

Want to use FreakyEnchants in your plugin? Lucky for you, the API is very simple and easy to understand!

Example of how to set the player's item in hand with an enchantment

public void addEnchantmentToPlayer(Player player, String customName, int level) {
	FreakyEnchants fe = (FreakyEnchants) Bukkit.getPluginManager().getPlugin("FreakyEnchants");
	if (fe == null)
		return;
	fe.getEnchManager().addEnchant(player.getItemInHand(), level, fe.getEnchant(customName));
}

Note that FreakyEnchants is open source, if you have any questions make sure to check the source first!

Clone this wiki locally