From 512ff7a52f9dac9adb5c59594c1c83bf482dec49 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 31 Jan 2020 19:20:02 +1100 Subject: [PATCH] Print legacy load reason in debug mode --- src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java index 1dfeda4871..b31e911500 100644 --- a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java +++ b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java @@ -23,6 +23,7 @@ import net.minecraft.server.IRegistry; import net.minecraft.server.Item; import net.minecraft.server.Items; import net.minecraft.server.MinecraftKey; +import net.minecraft.server.MinecraftServer; import net.minecraft.server.NBTBase; import net.minecraft.server.NBTTagCompound; import org.bukkit.Material; @@ -254,6 +255,9 @@ public final class CraftLegacy { static { System.err.println("Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!"); + if (MinecraftServer.getServer() != null && MinecraftServer.getServer().isDebugging()) { + new Exception().printStackTrace(); + } SPAWN_EGGS.put((byte) 0, Material.PIG_SPAWN_EGG); // Will be fixed by updateMaterial if possible