diff --git a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/Main.java b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/Main.java index 54ced32..9c24ada 100644 --- a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/Main.java +++ b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/Main.java @@ -8,6 +8,7 @@ import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; import java.io.File; +import java.util.logging.Logger; public class Main extends JavaPlugin { @@ -16,7 +17,10 @@ public class Main extends JavaPlugin { public static FileConfiguration config; public static FileConfiguration data; + public static Logger log; + public void onEnable() { + log = getLogger(); plugin = this; @@ -25,12 +29,12 @@ public class Main extends JavaPlugin { loadConfigs(); - getLogger().info("Plugin activated"); + log.info("Plugin activated"); } public void onDisable() { - getLogger().info("Plugin deactivated"); + log.info("Plugin deactivated"); } public void loadConfigs() { @@ -46,7 +50,7 @@ public class Main extends JavaPlugin { dataFile ); }catch (Exception ex){ - getLogger().severe("Could not load/create data.yml!"); + log.severe("Could not load/create data.yml!"); ex.printStackTrace(); Bukkit.getPluginManager().disablePlugin(this); }