mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-26 15:45:12 +01:00
Fixed essentials registration failing stopping the plugin from loading
This commit is contained in:
parent
6c19496ee8
commit
7c92ec8efe
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.integrations.registration;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.HashSet;
|
||||
@ -26,6 +27,12 @@ public class RegistrationManager {
|
||||
* Register all {@link com.willfp.ecoenchants.enchantments.EcoEnchant}s with Essentials.
|
||||
*/
|
||||
public static void registerEnchantments() {
|
||||
REGISTERED.forEach(RegistrationWrapper::registerAllEnchantments);
|
||||
for (RegistrationWrapper wrapper : REGISTERED) {
|
||||
try {
|
||||
wrapper.registerAllEnchantments();
|
||||
} catch (Exception e) {
|
||||
Bukkit.getLogger().warning("Failed to register enchantments for plugin " + wrapper.getPluginName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user