I'm trying to log into using MinecraftServer.logInfo(), but I get a nosuchmethod exception.
server.logInfo("Example message");
I'm getting the instance of MinecraftServer in the server starting event.
MinecraftServer server = event.getServer();
event.getModLog()
, as some things apparently run before preInit and still need to be logged. This can be set right where it's declared aspublic static final Logger
in the main class and it's wonderful, works like a charm. You just have to remember toimport org.apache.logging.log4j.Logger;
andimport org.apache.logging.log4j.LogManager;
– Tulatulip