Update Enchant Plugins authored by Jules's avatar Jules
......@@ -42,7 +42,7 @@ public interface EnchantPlugin<T extends Enchantment> {
}
```
Here is, for instance, the implementation for the MythicEnchants plugin.
Here is, for instance, the implementation for the MythicEnchants plugin. The `MythicEnchant` class is a class that extends the default `Enchantment` Bukkit class. `getNamespacedKey(String)` should return a namespaced key with your plugin as namespace. `handleEnchant(...)` is ran everytime an item is (re)generated and basically adds one line to the lore to indicate that an enchant is applied onto the item. the `ItemStackBuilder` class can be used to access the `LoreBuilder` class which contains all the methods required to edit the item lore. `LoreBuilder#insert(int, String)` can be used to insert at 1st position any string.
```
public class MythicEnchantsSupport implements EnchantPlugin<MythicEnchant> {
......@@ -65,5 +65,4 @@ public class MythicEnchantsSupport implements EnchantPlugin<MythicEnchant> {
builder.getLore().insert(0, LoreParser.formatEnchantment(enchant, level));
}
}
```
\ No newline at end of file