mirror of
https://github.com/nulli0n/ExcellentEnchants-spigot.git
synced 2024-11-26 12:15:28 +01:00
EnchantRegistry fix
This commit is contained in:
parent
938d15c2f4
commit
962dc81bec
@ -13,6 +13,7 @@ public class PeriodImplementation implements Periodic {
|
||||
|
||||
public PeriodImplementation(@NotNull ExcellentEnchant enchant, @NotNull EnchantScaler triggerInterval) {
|
||||
this.triggerInterval = triggerInterval;
|
||||
this.updateTriggerTime();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
@ -178,8 +178,10 @@ public class EnchantRegistry extends AbstractManager<ExcellentEnchants> {
|
||||
|
||||
@Override
|
||||
protected void onShutdown() {
|
||||
if (!isLocked) {
|
||||
ENCHANTS_MAP.clear();
|
||||
}
|
||||
}
|
||||
|
||||
public <T extends IEnchantment> void registerType(@NotNull Class<T> enchantClass) {
|
||||
ENCHANTS_MAP.computeIfAbsent(enchantClass, k -> new HashSet<>());
|
||||
|
Loading…
Reference in New Issue
Block a user