SPIGOT-6026: Pull PotionEffectType and Enchantment from registry

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2023-12-06 03:40:00 +11:00
parent 8398e12b34
commit dd8ca5c2dc
9 changed files with 226 additions and 265 deletions

View File

@@ -329,13 +329,7 @@ public final class CraftServer implements Server {
CraftRegistry.setMinecraftRegistry(console.registryAccess());
// Register all the Enchantments and PotionTypes now so we can stop new registration immediately after
Enchantments.SHARPNESS.getClass();
org.bukkit.enchantments.Enchantment.stopAcceptingRegistrations();
Potion.setPotionBrewer(new CraftPotionBrewer());
MobEffects.BLINDNESS.getClass();
PotionEffectType.stopAcceptingRegistrations();
// Ugly hack :(
if (!Main.useConsole) {