mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01:00
Logger cleanup pt 1.
This commit is contained in:
parent
f3b005e331
commit
427b97433e
@ -12,7 +12,7 @@ import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class AlternativeCommandsHandler
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private static final Logger LOGGER = Logger.getLogger("Essentials");
|
||||
private final transient Map<String, List<PluginCommand>> altcommands = new HashMap<String, List<PluginCommand>>();
|
||||
private final transient Map<String, String> disabledList = new HashMap<String, String>();
|
||||
private final transient IEssentials ess;
|
||||
|
@ -13,7 +13,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
public class Backup implements Runnable
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private static final Logger LOGGER = Logger.getLogger("Essentials");
|
||||
private transient final Server server;
|
||||
private transient final IEssentials ess;
|
||||
private transient boolean running = false;
|
||||
|
@ -82,7 +82,7 @@ import org.yaml.snakeyaml.error.YAMLException;
|
||||
public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
|
||||
{
|
||||
public static final int BUKKIT_VERSION = 2882;
|
||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private static final Logger LOGGER = Logger.getLogger("Essentials");
|
||||
private transient ISettings settings;
|
||||
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
|
||||
private transient Jails jails;
|
||||
@ -136,6 +136,7 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
|
||||
{
|
||||
try
|
||||
{
|
||||
LOGGER.setParent(this.getLogger());
|
||||
execTimer = new ExecuteTimer();
|
||||
execTimer.start();
|
||||
i18n = new I18n(this);
|
||||
|
@ -31,7 +31,7 @@ import org.bukkit.util.Vector;
|
||||
|
||||
public class EssentialsConf extends YamlConfiguration
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private static final Logger LOGGER = Logger.getLogger("Essentials");
|
||||
private final File configFile;
|
||||
private String templateName = null;
|
||||
private Class<?> resourceClass = EssentialsConf.class;
|
||||
|
@ -18,7 +18,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class EssentialsEntityListener implements Listener
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private static final Logger LOGGER = Logger.getLogger("Essentials");
|
||||
private static final transient Pattern powertoolPlayer = Pattern.compile("\\{player\\}");
|
||||
private final IEssentials ess;
|
||||
|
||||
|
@ -35,7 +35,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class EssentialsPlayerListener implements Listener
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private static final Logger LOGGER = Logger.getLogger("Essentials");
|
||||
private final transient IEssentials ess;
|
||||
|
||||
public EssentialsPlayerListener(final IEssentials parent)
|
||||
|
@ -22,7 +22,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class EssentialsUpgrade
|
||||
{
|
||||
private final static Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private final static Logger LOGGER = Logger.getLogger("Essentials");
|
||||
private final transient IEssentials ess;
|
||||
private final transient EssentialsConf doneFile;
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class I18n implements net.ess3.api.II18n
|
||||
}
|
||||
catch (MissingResourceException ex)
|
||||
{
|
||||
Logger.getLogger("Minecraft").log(Level.WARNING, String.format("Missing translation key \"%s\" in translation file %s", ex.getKey(), localeBundle.getLocale().toString()), ex);
|
||||
Logger.getLogger("Essentials").log(Level.WARNING, String.format("Missing translation key \"%s\" in translation file %s", ex.getKey(), localeBundle.getLocale().toString()), ex);
|
||||
return defaultBundle.getString(string);
|
||||
}
|
||||
}
|
||||
@ -128,7 +128,7 @@ public class I18n implements net.ess3.api.II18n
|
||||
currentLocale = new Locale(parts[0], parts[1], parts[2]);
|
||||
}
|
||||
ResourceBundle.clearCache();
|
||||
Logger.getLogger("Minecraft").log(Level.INFO, String.format("Using locale %s", currentLocale.toString()));
|
||||
Logger.getLogger("Essentials").log(Level.INFO, String.format("Using locale %s", currentLocale.toString()));
|
||||
customBundle = ResourceBundle.getBundle(MESSAGES, currentLocale, new FileResClassLoader(I18n.class.getClassLoader(), ess));
|
||||
localeBundle = ResourceBundle.getBundle(MESSAGES, currentLocale);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public enum Mob
|
||||
MINECART_MOB_SPAWNER("SpawnerMinecart", Enemies.NEUTRAL, EntityType.MINECART_MOB_SPAWNER),
|
||||
ENDERCRYSTAL("EnderCrystal", Enemies.NEUTRAL, EntityType.ENDER_CRYSTAL),
|
||||
EXPERIENCEORB("ExperienceOrb", Enemies.NEUTRAL, EntityType.EXPERIENCE_ORB);
|
||||
public static final Logger logger = Logger.getLogger("Minecraft");
|
||||
public static final Logger logger = Logger.getLogger("Essentials");
|
||||
|
||||
private Mob(String n, Enemies en, String s, EntityType type)
|
||||
{
|
||||
|
@ -126,7 +126,7 @@ public enum MobData
|
||||
EXP,
|
||||
SIZE;
|
||||
}
|
||||
public static final Logger logger = Logger.getLogger("Minecraft");
|
||||
public static final Logger logger = Logger.getLogger("Essentials");
|
||||
|
||||
private MobData(String n, Object type, Object value, boolean isPublic)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
public class Settings implements net.ess3.api.ISettings
|
||||
{
|
||||
private final transient EssentialsConf config;
|
||||
private final static Logger logger = Logger.getLogger("Minecraft");
|
||||
private final static Logger logger = Logger.getLogger("Essentials");
|
||||
private final transient IEssentials ess;
|
||||
private boolean metricsEnabled = true;
|
||||
|
||||
|
@ -340,7 +340,7 @@ public class Trade
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex);
|
||||
Logger.getLogger("Essentials").log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@ -428,7 +428,7 @@ public class Trade
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex);
|
||||
Logger.getLogger("Essentials").log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -442,7 +442,7 @@ public class Trade
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex);
|
||||
Logger.getLogger("Essentials").log(Level.SEVERE, null, ex);
|
||||
}
|
||||
fw = null;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public class User extends UserData implements Comparable<User>, IReplyTo, net.ess3.api.IUser
|
||||
{
|
||||
private static final Logger logger = Logger.getLogger("Minecraft");
|
||||
private static final Logger logger = Logger.getLogger("Essentials");
|
||||
private CommandSource replyTo = null;
|
||||
private transient String teleportRequester;
|
||||
private transient boolean teleportRequestHere;
|
||||
|
@ -16,7 +16,7 @@ import org.bukkit.Server;
|
||||
|
||||
public class Warps implements IConf, net.ess3.api.IWarps
|
||||
{
|
||||
private static final Logger logger = Logger.getLogger("Minecraft");
|
||||
private static final Logger logger = Logger.getLogger("Essentials");
|
||||
private final Map<StringIgnoreCase, EssentialsConf> warpPoints = new HashMap<StringIgnoreCase, EssentialsConf>();
|
||||
private final File warpsFolder;
|
||||
private final Server server;
|
||||
|
@ -12,7 +12,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class Worth implements IConf
|
||||
{
|
||||
private static final Logger logger = Logger.getLogger("Minecraft");
|
||||
private static final Logger logger = Logger.getLogger("Essentials");
|
||||
private final EssentialsConf config;
|
||||
|
||||
public Worth(File dataFolder)
|
||||
|
@ -31,7 +31,7 @@ public class Economy
|
||||
public Economy()
|
||||
{
|
||||
}
|
||||
private static final Logger logger = Logger.getLogger("Minecraft");
|
||||
private static final Logger logger = Logger.getLogger("Essentials");
|
||||
private static IEssentials ess;
|
||||
private static final String noCallBeforeLoad = "Essentials API is called before Essentials is loaded.";
|
||||
public static final MathContext MATH_CONTEXT = MathContext.DECIMAL128;
|
||||
|
@ -16,7 +16,7 @@ public class Commandsudo extends EssentialsCommand
|
||||
{
|
||||
super("sudo");
|
||||
}
|
||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private static final Logger LOGGER = Logger.getLogger("Essentials");
|
||||
|
||||
@Override
|
||||
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
|
||||
|
@ -17,7 +17,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
|
||||
private final transient String name;
|
||||
protected transient IEssentials ess;
|
||||
protected transient IEssentialsModule module;
|
||||
protected final static Logger logger = Logger.getLogger("Minecraft");
|
||||
protected final static Logger logger = Logger.getLogger("Essentials");
|
||||
|
||||
protected EssentialsCommand(final String name)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ public class PermissionsHandler implements IPermissionsHandler
|
||||
private transient IPermissionsHandler handler = new NullPermissionsHandler();
|
||||
private transient String defaultGroup = "default";
|
||||
private final transient Plugin plugin;
|
||||
private final static Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private final static Logger LOGGER = Logger.getLogger("Essentials");
|
||||
private transient boolean useSuperperms = false;
|
||||
|
||||
public PermissionsHandler(final Plugin plugin)
|
||||
|
@ -17,7 +17,7 @@ import org.bukkit.event.block.*;
|
||||
|
||||
public class SignBlockListener implements Listener
|
||||
{
|
||||
private final static Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private final static Logger LOGGER = Logger.getLogger("Essentials");
|
||||
private final static Material WALL_SIGN = Material.WALL_SIGN;
|
||||
private final static Material SIGN_POST = Material.SIGN_POST;
|
||||
private final transient IEssentials ess;
|
||||
|
@ -16,7 +16,7 @@ public class HelpInput implements IText
|
||||
private static final String DESCRIPTION = "description";
|
||||
private static final String PERMISSION = "permission";
|
||||
private static final String PERMISSIONS = "permissions";
|
||||
private final static Logger logger = Logger.getLogger("Minecraft");
|
||||
private final static Logger logger = Logger.getLogger("Essentials");
|
||||
private final transient List<String> lines = new ArrayList<String>();
|
||||
private final transient List<String> chapters = new ArrayList<String>();
|
||||
private final transient Map<String, Integer> bookmarks = new HashMap<String, Integer>();
|
||||
|
@ -61,7 +61,7 @@ commands:
|
||||
aliases: [eburn]
|
||||
clearinventory:
|
||||
description: Clear all items in your inventory.
|
||||
usage: /<command> [player|*] [item[:<data>]|*|**]
|
||||
usage: /<command> [player|*] [item[:<data>]|*|**] [amount]
|
||||
aliases: [ci,eci,clean,eclean,clear,eclear,clearinvent,eclearinvent,eclearinventory]
|
||||
compass:
|
||||
description: Describes your current bearing.
|
||||
|
Loading…
Reference in New Issue
Block a user