diff --git a/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java b/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java index 9f0a7841..34e9f0cc 100644 --- a/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java +++ b/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java @@ -321,12 +321,12 @@ public class ItemManager { White(0, "White"), Orange(1, "Orange"), Magenta(2, "Magenta"), - LIGHT_BLUE(3, "Light Blue"), // TODO: Not work, github issue: #267 + Navy(3, "Navy Blue"), Yellow(4, "Yellow"), Lime(5, "Lime Green"), Pink(6, "Pink"), Gray(7, "Gray"), - LIGHT_GRAY(8, "Light Gray"), // TODO: Not work, github issue: #267 + Silver(8, "Silver"), Cyan(9, "Cyan"), Purple(10, "Purple"), Blue(11, "Blue"), diff --git a/src/main/java/com/gamingmesh/jobs/HookEconomyTask.java b/src/main/java/com/gamingmesh/jobs/HookEconomyTask.java index 6679638d..96d727a4 100644 --- a/src/main/java/com/gamingmesh/jobs/HookEconomyTask.java +++ b/src/main/java/com/gamingmesh/jobs/HookEconomyTask.java @@ -41,12 +41,12 @@ public class HookEconomyTask implements Runnable { // no Economy found Jobs.setEconomy(plugin, new BlackholeEconomy()); - Bukkit.getServer().getLogger().severe("==================== " + plugin.getDescription().getName() + " ===================="); - Bukkit.getServer().getLogger().severe("Vault is required by this plugin for economy support!"); - Bukkit.getServer().getLogger().severe("Please install them first!"); - Bukkit.getServer().getLogger().severe("You can find the latest versions here:"); - Bukkit.getServer().getLogger().severe("https://www.spigotmc.org/resources/vault.34315/"); - Bukkit.getServer().getLogger().severe("=============================================="); + Jobs.getPluginLogger().severe("==================== " + plugin.getDescription().getName() + " ===================="); + Jobs.getPluginLogger().severe("Vault is required by this plugin for economy support!"); + Jobs.getPluginLogger().severe("Please install them first!"); + Jobs.getPluginLogger().severe("You can find the latest versions here:"); + Jobs.getPluginLogger().severe("https://www.spigotmc.org/resources/vault.34315/"); + Jobs.getPluginLogger().severe("=============================================="); } private boolean setVault() { diff --git a/src/main/java/com/gamingmesh/jobs/Jobs.java b/src/main/java/com/gamingmesh/jobs/Jobs.java index 085899ed..a699bd0d 100644 --- a/src/main/java/com/gamingmesh/jobs/Jobs.java +++ b/src/main/java/com/gamingmesh/jobs/Jobs.java @@ -809,13 +809,13 @@ public class Jobs extends JavaPlugin { restrictedBlocks.saveDefaultConfig(); setPermissionHandler(new PermissionHandler(this)); + setPluginLogger(getLogger()); setJobsClassloader(); setPlayerManager(); setLanguage(); setGUIManager(); setExplore(); setBBManager(); - setPluginLogger(getLogger()); setLoging(); setGCManager(); setConfigManager(); diff --git a/src/main/java/com/gamingmesh/jobs/PlayerManager.java b/src/main/java/com/gamingmesh/jobs/PlayerManager.java index d38892e4..0975f5bb 100644 --- a/src/main/java/com/gamingmesh/jobs/PlayerManager.java +++ b/src/main/java/com/gamingmesh/jobs/PlayerManager.java @@ -543,7 +543,7 @@ public class PlayerManager { if (player != null && player.getLocation() != null) player.getWorld().playSound(player.getLocation(), sound, levelUpEvent.getSoundVolume(), levelUpEvent.getSoundPitch()); } else - Bukkit.getConsoleSender().sendMessage("[Jobs] Can't find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it"); + Jobs.consoleMsg("[Jobs] Can't find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it"); } } catch (Exception e) { } @@ -568,7 +568,7 @@ public class PlayerManager { for (String line : message.split("\n")) { if (Jobs.getGCManager().isBroadcastingLevelups()) { if (Jobs.getGCManager().BroadcastingLevelUpLevels.contains(oldLevel + 1) || Jobs.getGCManager().BroadcastingLevelUpLevels.contains(0)) - Bukkit.getServer().broadcastMessage(line); + Jobs.consoleMsg(line); } else if (player != null) { if (Jobs.getGCManager().LevelChangeActionBar) Jobs.getActionBar().send(player, line); @@ -588,7 +588,7 @@ public class PlayerManager { player.getWorld().playSound(player.getLocation(), sound, levelUpEvent.getTitleChangeVolume(), levelUpEvent.getTitleChangePitch()); } else - Bukkit.getConsoleSender().sendMessage("[Jobs] Can't find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it"); + Jobs.consoleMsg("[Jobs] Can't find sound by name: " + levelUpEvent.getTitleChangeSound().name() + ". Please update it"); } } catch (Exception e) { } @@ -607,7 +607,7 @@ public class PlayerManager { message = message.replace("%jobname%", job.getChatColor() + job.getName()); for (String line : message.split("\n")) { if (Jobs.getGCManager().isBroadcastingSkillups()) - Bukkit.getServer().broadcastMessage(line); + Jobs.consoleMsg(line); else if (player != null) { if (Jobs.getGCManager().TitleChangeActionBar) Jobs.getActionBar().send(player, line); diff --git a/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java b/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java index fe035dbe..4892ee41 100644 --- a/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java @@ -101,12 +101,12 @@ public class ConfigManager { if (s != null) s.close(); } catch (Exception e) { - Bukkit.getServer().getLogger().severe("==================== Jobs ===================="); - Bukkit.getServer().getLogger().severe("Unable to load jobConfig.yml!"); - Bukkit.getServer().getLogger().severe("Check your config for formatting issues!"); - Bukkit.getServer().getLogger().severe("No jobs were loaded!"); - Bukkit.getServer().getLogger().severe("Error: " + e.getMessage()); - Bukkit.getServer().getLogger().severe("=============================================="); + Jobs.getPluginLogger().severe("==================== Jobs ===================="); + Jobs.getPluginLogger().severe("Unable to load jobConfig.yml!"); + Jobs.getPluginLogger().severe("Check your config for formatting issues!"); + Jobs.getPluginLogger().severe("No jobs were loaded!"); + Jobs.getPluginLogger().severe("Error: " + e.getMessage()); + Jobs.getPluginLogger().severe("=============================================="); return; } finally { if (s != null) @@ -421,12 +421,12 @@ public class ConfigManager { conf.load(s); s.close(); } catch (Exception e) { - Bukkit.getServer().getLogger().severe("==================== Jobs ===================="); - Bukkit.getServer().getLogger().severe("Unable to load jobConfig.yml!"); - Bukkit.getServer().getLogger().severe("Check your config for formatting issues!"); - Bukkit.getServer().getLogger().severe("No jobs were loaded!"); - Bukkit.getServer().getLogger().severe("Error: " + e.getMessage()); - Bukkit.getServer().getLogger().severe("=============================================="); + Jobs.getPluginLogger().severe("==================== Jobs ===================="); + Jobs.getPluginLogger().severe("Unable to load jobConfig.yml!"); + Jobs.getPluginLogger().severe("Check your config for formatting issues!"); + Jobs.getPluginLogger().severe("No jobs were loaded!"); + Jobs.getPluginLogger().severe("Error: " + e.getMessage()); + Jobs.getPluginLogger().severe("=============================================="); return; } finally { s.close(); diff --git a/src/main/java/com/gamingmesh/jobs/config/NameTranslatorManager.java b/src/main/java/com/gamingmesh/jobs/config/NameTranslatorManager.java index bd890d7f..0d9aff7b 100644 --- a/src/main/java/com/gamingmesh/jobs/config/NameTranslatorManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/NameTranslatorManager.java @@ -431,12 +431,12 @@ public class NameTranslatorManager { c.get("ColorList.0-white", "&fWhite"); c.get("ColorList.1-orange", "&6Orange"); c.get("ColorList.2-magenta", "&dMagenta"); - c.get("ColorList.3-LIGHT_BLUE", "&9Light blue"); + c.get("ColorList.3-navy", "&9Navy"); c.get("ColorList.4-yellow", "&eYellow"); c.get("ColorList.5-lime", "&aLime"); c.get("ColorList.6-pink", "&dPink"); c.get("ColorList.7-gray", "&8Gray"); - c.get("ColorList.8-LIGHT_GRAY", "&7Light gray"); + c.get("ColorList.8-silver", "&7Silver"); c.get("ColorList.9-cyan", "&3Cyan"); c.get("ColorList.10-purple", "&5Purple"); c.get("ColorList.11-blue", "&1Blue"); diff --git a/src/main/java/com/gamingmesh/jobs/i18n/Language.java b/src/main/java/com/gamingmesh/jobs/i18n/Language.java index 1d5a005d..539f917d 100644 --- a/src/main/java/com/gamingmesh/jobs/i18n/Language.java +++ b/src/main/java/com/gamingmesh/jobs/i18n/Language.java @@ -68,7 +68,7 @@ public class Language { else msg = customlocale.isString(key) ? Colors(customlocale.getString(key)) : missing; } catch (Exception e) { - Bukkit.getServer().getConsoleSender().sendMessage(Colors("&e[Jobs] &2Can't read language file for: " + key)); + Jobs.consoleMsg("&e[Jobs] &2Can't read language file for: " + key); Bukkit.getServer().getPluginManager().disablePlugin(plugin); e.printStackTrace(); throw e; diff --git a/src/main/resources/jobConfig.yml b/src/main/resources/jobConfig.yml index 4aee0a8e..8b4ec661 100644 --- a/src/main/resources/jobConfig.yml +++ b/src/main/resources/jobConfig.yml @@ -345,10 +345,10 @@ Jobs: Green: income: 2.0 experience: 5.0 - Light_blue: + Navy: income: 2.0 experience: 5.0 - 'Lime Green': + Lime: income: 2.0 experience: 5.0 Magenta: @@ -366,7 +366,7 @@ Jobs: Red: income: 2.0 experience: 5.0 - 'Light Gray': + Silver: income: 2.0 experience: 5.0 White: @@ -1749,7 +1749,7 @@ Jobs: income: 4.0 points: 4.0 experience: 5.0 - 'Light Blue': + Navy: income: 4.0 points: 4.0 experience: 5.0 @@ -1765,7 +1765,7 @@ Jobs: income: 4.0 points: 4.0 experience: 5.0 - 'Light Gray': + Silver: income: 4.0 points: 4.0 experience: 5.0