Updated plugin logger

This commit is contained in:
BuildTools 2020-10-03 13:28:58 +01:00
parent 8f70b21cde
commit 6aa0fdcc30
2 changed files with 7 additions and 4 deletions

View File

@ -26,7 +26,7 @@ public class Magnetic extends EcoEnchant implements EcoRunnable {
);
}
private HashMap<Player, Integer> players = new HashMap<>();
private final HashMap<Player, Integer> players = new HashMap<>();
private double initialDistance = 1;
private double bonus = 1;

View File

@ -1,17 +1,20 @@
package com.willfp.ecoenchants.util;
import com.willfp.ecoenchants.EcoEnchantsPlugin;
import org.bukkit.Bukkit;
public class Logger {
private static final EcoEnchantsPlugin INSTANCE = EcoEnchantsPlugin.getInstance();
public static void info(String message) {
Bukkit.getLogger().info(StringUtils.translate(message));
INSTANCE.getLogger().info(StringUtils.translate(message));
}
public static void warn(String message) {
Bukkit.getLogger().warning(StringUtils.translate(message));
INSTANCE.getLogger().warning(StringUtils.translate(message));
}
public static void error(String message) {
Bukkit.getLogger().severe(StringUtils.translate(message));
INSTANCE.getLogger().severe(StringUtils.translate(message));
}
}