That's definitely the worst way to get a static Logger (maybe)
but the only one I've figured out (just don't want to take JavaPlugin with me)
LOGGERs are static everywhere except for spigot xD
but the only one I've figured out (just don't want to take JavaPlugin with me)
LOGGERs are static everywhere except for spigot xD
Java:
public final class TrySpigotPlugin extends JavaPlugin {
private static Logger logger;
@Override
public void onEnable() {
logger = getLogger();
}
@Override
public void onDisable() {
}
public static Logger getLog() {
return logger;
}
}
Last edited: