Improves logging a bit
This commit is contained in:
@@ -251,11 +251,7 @@ public class Stargate extends JavaPlugin {
|
|||||||
if (logger == null) {
|
if (logger == null) {
|
||||||
logger = Bukkit.getLogger();
|
logger = Bukkit.getLogger();
|
||||||
}
|
}
|
||||||
if (getInstance() == null || stargateConfig == null || stargateConfig.isNotLoaded()) {
|
logger.log(severity, message);
|
||||||
logger.log(severity, "[Stargate]: " + message);
|
|
||||||
} else {
|
|
||||||
logger.log(severity, getBackupString("prefix") + message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -385,6 +381,8 @@ public class Stargate extends JavaPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
stargate = this;
|
||||||
|
logger = getLogger();
|
||||||
this.saveDefaultConfig();
|
this.saveDefaultConfig();
|
||||||
this.getConfig();
|
this.getConfig();
|
||||||
PluginDescriptionFile pluginDescriptionFile = this.getDescription();
|
PluginDescriptionFile pluginDescriptionFile = this.getDescription();
|
||||||
@@ -397,9 +395,7 @@ public class Stargate extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
this.configuration.options().copyDefaults(true);
|
this.configuration.options().copyDefaults(true);
|
||||||
|
|
||||||
logger = Logger.getLogger("Minecraft");
|
|
||||||
Server server = getServer();
|
Server server = getServer();
|
||||||
stargate = this;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
stargateConfig = new StargateConfig(logger);
|
stargateConfig = new StargateConfig(logger);
|
||||||
|
Reference in New Issue
Block a user