mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Updated Register Enchantments (markdown)
parent
e8ed0ceac8
commit
6c5c52c596
1 changed files with 8 additions and 8 deletions
|
|
@ -47,15 +47,15 @@ To register the enchantment present on startup, you should listen to the `CAEnch
|
|||
It should look something like this example:
|
||||
|
||||
```java
|
||||
@EventHandler
|
||||
public void onEnchantmentRegistry(CAEnchantRegistryReadyEvent event){
|
||||
@EventHandler
|
||||
public void onEnchantmentRegistry(CAEnchantRegistryReadyEvent event){
|
||||
// you could also get a list of your enchantment object and create CAEnchant object from your object.
|
||||
List<CAEnchantment> enchantments = getEnchantmentList();
|
||||
for (CAEnchantment enchantment : enchantments) {
|
||||
EnchantmentApi.registerEnchantment(enchantment);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
***
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue