EnchantRegistry fix

This commit is contained in:
BuildTools 2023-11-12 21:34:10 +05:00
parent 938d15c2f4
commit 962dc81bec
2 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,7 @@ public class PeriodImplementation implements Periodic {
public PeriodImplementation(@NotNull ExcellentEnchant enchant, @NotNull EnchantScaler triggerInterval) {
this.triggerInterval = triggerInterval;
this.updateTriggerTime();
}
@NotNull

View File

@ -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<>());