mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
Fixed issue with colors not work, #267
This commit is contained in:
parent
432cbbbd09
commit
6709abca2f
@ -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"),
|
||||
|
@ -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() {
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user