Also clear ClassInfo cache after server starts
This commit is contained in:
parent
e5028535e9
commit
74c3f0ff90
|
|
@ -105,6 +105,7 @@ public class ModernFix {
|
||||||
float gameStartTime = ManagementFactory.getRuntimeMXBean().getUptime() / 1000f;
|
float gameStartTime = ManagementFactory.getRuntimeMXBean().getUptime() / 1000f;
|
||||||
ModernFix.LOGGER.warn("Dedicated server took " + gameStartTime + " seconds to load");
|
ModernFix.LOGGER.warn("Dedicated server took " + gameStartTime + " seconds to load");
|
||||||
}
|
}
|
||||||
|
ClassInfoManager.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,10 @@ public class ClassInfoManager {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
classInfoCache.entrySet().removeIf(entry -> !entry.getKey().equals("java/lang/Object"));
|
try {
|
||||||
|
classInfoCache.entrySet().removeIf(entry -> !entry.getKey().equals("java/lang/Object"));
|
||||||
|
} catch(RuntimeException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user