mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-12-28 20:47:37 +01:00
Removed explicit color codes in loader
This commit is contained in:
parent
0481b6a49d
commit
7d452882a2
@ -77,8 +77,8 @@ public class Loader {
|
|||||||
public static void load() {
|
public static void load() {
|
||||||
Logger.info("==========================================");
|
Logger.info("==========================================");
|
||||||
Logger.info("");
|
Logger.info("");
|
||||||
Logger.info("Loading §aEcoEnchants");
|
Logger.info("Loading &aEcoEnchants");
|
||||||
Logger.info("Made by §aAuxilor§f - willfp.com");
|
Logger.info("Made by &aAuxilor&f - willfp.com");
|
||||||
Logger.info("");
|
Logger.info("");
|
||||||
Logger.info("==========================================");
|
Logger.info("==========================================");
|
||||||
|
|
||||||
@ -112,34 +112,34 @@ public class Loader {
|
|||||||
Logger.info("Loading NMS APIs...");
|
Logger.info("Loading NMS APIs...");
|
||||||
|
|
||||||
if(Cooldown.init()) {
|
if(Cooldown.init()) {
|
||||||
Logger.info("Cooldown: §aSUCCESS");
|
Logger.info("Cooldown: &aSUCCESS");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("Cooldown: §cFAILURE");
|
Logger.info("Cooldown: &cFAILURE");
|
||||||
Logger.error("§cAborting...");
|
Logger.error("&cAborting...");
|
||||||
Bukkit.getPluginManager().disablePlugin(EcoEnchantsPlugin.getInstance());
|
Bukkit.getPluginManager().disablePlugin(EcoEnchantsPlugin.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(TridentStack.init()) {
|
if(TridentStack.init()) {
|
||||||
Logger.info("Trident API: §aSUCCESS");
|
Logger.info("Trident API: &aSUCCESS");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("Trident API: §cFAILURE");
|
Logger.info("Trident API: &cFAILURE");
|
||||||
Logger.error("§cAborting...");
|
Logger.error("&cAborting...");
|
||||||
Bukkit.getPluginManager().disablePlugin(EcoEnchantsPlugin.getInstance());
|
Bukkit.getPluginManager().disablePlugin(EcoEnchantsPlugin.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(BlockBreak.init()) {
|
if(BlockBreak.init()) {
|
||||||
Logger.info("Block Break: §aSUCCESS");
|
Logger.info("Block Break: &aSUCCESS");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("Block Break: §cFAILURE");
|
Logger.info("Block Break: &cFAILURE");
|
||||||
Logger.error("§cAborting...");
|
Logger.error("&cAborting...");
|
||||||
Bukkit.getPluginManager().disablePlugin(EcoEnchantsPlugin.getInstance());
|
Bukkit.getPluginManager().disablePlugin(EcoEnchantsPlugin.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(RepairCost.init()) {
|
if(RepairCost.init()) {
|
||||||
Logger.info("Repair Cost: §aSUCCESS");
|
Logger.info("Repair Cost: &aSUCCESS");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("Repair Cost: §cFAILURE");
|
Logger.info("Repair Cost: &cFAILURE");
|
||||||
Logger.error("§cAborting...");
|
Logger.error("&cAborting...");
|
||||||
Bukkit.getPluginManager().disablePlugin(EcoEnchantsPlugin.getInstance());
|
Bukkit.getPluginManager().disablePlugin(EcoEnchantsPlugin.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ public class Loader {
|
|||||||
EnchantmentRarity.update();
|
EnchantmentRarity.update();
|
||||||
EnchantmentTarget.update();
|
EnchantmentTarget.update();
|
||||||
if(EnchantmentRarity.getAll().size() == 0 || EnchantmentTarget.getAll().size() == 0) {
|
if(EnchantmentRarity.getAll().size() == 0 || EnchantmentTarget.getAll().size() == 0) {
|
||||||
Logger.error("§cError loading rarities or targets! Aborting...");
|
Logger.error("&cError loading rarities or targets! Aborting...");
|
||||||
Bukkit.getPluginManager().disablePlugin(EcoEnchantsPlugin.getInstance());
|
Bukkit.getPluginManager().disablePlugin(EcoEnchantsPlugin.getInstance());
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@ -205,7 +205,7 @@ public class Loader {
|
|||||||
|
|
||||||
ExtensionManager.loadExtensions();
|
ExtensionManager.loadExtensions();
|
||||||
if(ExtensionManager.getLoadedExtensions().isEmpty()) {
|
if(ExtensionManager.getLoadedExtensions().isEmpty()) {
|
||||||
Logger.info("§cNo extensions found");
|
Logger.info("&cNo extensions found");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("Extensions Loaded:");
|
Logger.info("Extensions Loaded:");
|
||||||
ExtensionManager.getLoadedExtensions().forEach((extension, name) -> {
|
ExtensionManager.getLoadedExtensions().forEach((extension, name) -> {
|
||||||
@ -215,7 +215,7 @@ public class Loader {
|
|||||||
Logger.info("");
|
Logger.info("");
|
||||||
|
|
||||||
if (EcoEnchants.getAll().size() == 0) {
|
if (EcoEnchants.getAll().size() == 0) {
|
||||||
Logger.error("§cError adding enchantments! Aborting...");
|
Logger.error("&cError adding enchantments! Aborting...");
|
||||||
Bukkit.getPluginManager().disablePlugin(EcoEnchantsPlugin.getInstance());
|
Bukkit.getPluginManager().disablePlugin(EcoEnchantsPlugin.getInstance());
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@ -300,7 +300,7 @@ public class Loader {
|
|||||||
|
|
||||||
Bukkit.getScheduler().runTaskLater(EcoEnchantsPlugin.getInstance(), Loader::postLoad, 1);
|
Bukkit.getScheduler().runTaskLater(EcoEnchantsPlugin.getInstance(), Loader::postLoad, 1);
|
||||||
|
|
||||||
Logger.info("Loaded §aEcoEnchants!");
|
Logger.info("Loaded &aEcoEnchants!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -323,15 +323,15 @@ public class Loader {
|
|||||||
Logger.info("EcoEnchants Updater");
|
Logger.info("EcoEnchants Updater");
|
||||||
Logger.info("");
|
Logger.info("");
|
||||||
if (currentVersion.compareTo(mostRecentVersion) > 0 || currentVersion.equals(mostRecentVersion)) {
|
if (currentVersion.compareTo(mostRecentVersion) > 0 || currentVersion.equals(mostRecentVersion)) {
|
||||||
Logger.info("§aEcoEnchants is up to date! (Version " + EcoEnchantsPlugin.getInstance().getDescription().getVersion() + ")");
|
Logger.info("&aEcoEnchants is up to date! (Version " + EcoEnchantsPlugin.getInstance().getDescription().getVersion() + ")");
|
||||||
} else {
|
} else {
|
||||||
EcoEnchantsPlugin.outdated = true;
|
EcoEnchantsPlugin.outdated = true;
|
||||||
EcoEnchantsPlugin.newVersion = version;
|
EcoEnchantsPlugin.newVersion = version;
|
||||||
|
|
||||||
Bukkit.getScheduler().runTaskTimer(EcoEnchantsPlugin.getInstance(), () -> {
|
Bukkit.getScheduler().runTaskTimer(EcoEnchantsPlugin.getInstance(), () -> {
|
||||||
Logger.info("§6EcoEnchants is out of date! (Version " + EcoEnchantsPlugin.getInstance().getDescription().getVersion() + ")");
|
Logger.info("&6EcoEnchants is out of date! (Version " + EcoEnchantsPlugin.getInstance().getDescription().getVersion() + ")");
|
||||||
Logger.info("§6The newest version is §f" + version);
|
Logger.info("&6The newest version is &f" + version);
|
||||||
Logger.info("§6Download the new version here: §fhttps://www.spigotmc.org/resources/ecoenchants.79573/");
|
Logger.info("&6Download the new version here: &fhttps://www.spigotmc.org/resources/ecoenchants.79573/");
|
||||||
}, 0, 864000);
|
}, 0, 864000);
|
||||||
}
|
}
|
||||||
Logger.info("");
|
Logger.info("");
|
||||||
@ -347,94 +347,94 @@ public class Loader {
|
|||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("WorldGuard")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("WorldGuard")) {
|
||||||
AntigriefManager.register(new AntigriefWorldGuard());
|
AntigriefManager.register(new AntigriefWorldGuard());
|
||||||
Logger.info("WorldGuard: §aENABLED");
|
Logger.info("WorldGuard: &aENABLED");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("WorldGuard: §9DISABLED");
|
Logger.info("WorldGuard: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("GriefPrevention")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("GriefPrevention")) {
|
||||||
AntigriefManager.register(new AntigriefGriefPrevention());
|
AntigriefManager.register(new AntigriefGriefPrevention());
|
||||||
Logger.info("GriefPrevention: §aENABLED");
|
Logger.info("GriefPrevention: &aENABLED");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("GriefPrevention: §9DISABLED");
|
Logger.info("GriefPrevention: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("FactionsUUID")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("FactionsUUID")) {
|
||||||
AntigriefManager.register(new AntigriefFactionsUUID());
|
AntigriefManager.register(new AntigriefFactionsUUID());
|
||||||
Logger.info("FactionsUUID: §aENABLED");
|
Logger.info("FactionsUUID: &aENABLED");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("FactionsUUID: §9DISABLED");
|
Logger.info("FactionsUUID: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("Towny")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("Towny")) {
|
||||||
AntigriefManager.register(new AntigriefTowny());
|
AntigriefManager.register(new AntigriefTowny());
|
||||||
Logger.info("Towny: §aENABLED");
|
Logger.info("Towny: &aENABLED");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("Towny: §9DISABLED");
|
Logger.info("Towny: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("Lands")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("Lands")) {
|
||||||
AntigriefManager.register(new AntigriefLands());
|
AntigriefManager.register(new AntigriefLands());
|
||||||
Logger.info("Lands: §aENABLED");
|
Logger.info("Lands: &aENABLED");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("Lands: §9DISABLED");
|
Logger.info("Lands: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("Kingdoms")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("Kingdoms")) {
|
||||||
AntigriefManager.register(new AntigriefKingdoms());
|
AntigriefManager.register(new AntigriefKingdoms());
|
||||||
Logger.info("Kingdoms: §aENABLED");
|
Logger.info("Kingdoms: &aENABLED");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("Kingdoms: §9DISABLED");
|
Logger.info("Kingdoms: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("Essentials")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("Essentials")) {
|
||||||
EssentialsManager.register(new IntegrationEssentials());
|
EssentialsManager.register(new IntegrationEssentials());
|
||||||
Logger.info("Essentials: §aENABLED");
|
Logger.info("Essentials: &aENABLED");
|
||||||
EssentialsManager.registerEnchantments();
|
EssentialsManager.registerEnchantments();
|
||||||
} else {
|
} else {
|
||||||
Logger.info("Essentials: §9DISABLED");
|
Logger.info("Essentials: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("AAC")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("AAC")) {
|
||||||
AnticheatManager.register(new AnticheatAAC());
|
AnticheatManager.register(new AnticheatAAC());
|
||||||
Logger.info("AAC: §aENABLED");
|
Logger.info("AAC: &aENABLED");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("AAC: §9DISABLED");
|
Logger.info("AAC: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("Matrix")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("Matrix")) {
|
||||||
AnticheatManager.register(new AnticheatMatrix());
|
AnticheatManager.register(new AnticheatMatrix());
|
||||||
Logger.info("Matrix: §aENABLED");
|
Logger.info("Matrix: &aENABLED");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("Matrix: §9DISABLED");
|
Logger.info("Matrix: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("NoCheatPlus")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("NoCheatPlus")) {
|
||||||
AnticheatManager.register(new AnticheatNCP());
|
AnticheatManager.register(new AnticheatNCP());
|
||||||
Logger.info("NCP: §aENABLED");
|
Logger.info("NCP: &aENABLED");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("NCP: §9DISABLED");
|
Logger.info("NCP: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("Spartan")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("Spartan")) {
|
||||||
AnticheatManager.register(new AnticheatSpartan());
|
AnticheatManager.register(new AnticheatSpartan());
|
||||||
Logger.info("Spartan: §aENABLED");
|
Logger.info("Spartan: &aENABLED");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("Spartan: §9DISABLED");
|
Logger.info("Spartan: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
|
||||||
PlaceholderManager.addIntegration(new PlaceholderIntegrationPAPI());
|
PlaceholderManager.addIntegration(new PlaceholderIntegrationPAPI());
|
||||||
Logger.info("PlaceholderAPI: §aENABLED");
|
Logger.info("PlaceholderAPI: &aENABLED");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("PlaceholderAPI: §9DISABLED");
|
Logger.info("PlaceholderAPI: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Bukkit.getPluginManager().isPluginEnabled("mcMMO")) {
|
if(Bukkit.getPluginManager().isPluginEnabled("mcMMO")) {
|
||||||
McmmoManager.registerIntegration(new McmmoIntegrationImpl());
|
McmmoManager.registerIntegration(new McmmoIntegrationImpl());
|
||||||
Logger.info("mcMMO: §aENABLED");
|
Logger.info("mcMMO: &aENABLED");
|
||||||
} else {
|
} else {
|
||||||
Logger.info("mcMMO: §9DISABLED");
|
Logger.info("mcMMO: &9DISABLED");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -449,7 +449,7 @@ public class Loader {
|
|||||||
Logger.error("You don't seem to be running paper!");
|
Logger.error("You don't seem to be running paper!");
|
||||||
Logger.error("Paper is strongly recommended for all servers,");
|
Logger.error("Paper is strongly recommended for all servers,");
|
||||||
Logger.error("and some enchantments may not function properly without it");
|
Logger.error("and some enchantments may not function properly without it");
|
||||||
Logger.error("Download Paper from §fhttps://papermc.io");
|
Logger.error("Download Paper from &fhttps://papermc.io");
|
||||||
Logger.error("");
|
Logger.error("");
|
||||||
Logger.error("----------------------------");
|
Logger.error("----------------------------");
|
||||||
Logger.error("");
|
Logger.error("");
|
||||||
@ -467,7 +467,7 @@ public class Loader {
|
|||||||
* Called by {@link EcoEnchantsPlugin#onDisable()}
|
* Called by {@link EcoEnchantsPlugin#onDisable()}
|
||||||
*/
|
*/
|
||||||
public static void unload() {
|
public static void unload() {
|
||||||
Logger.info("§cDisabling EcoEnchants...");
|
Logger.info("&cDisabling EcoEnchants...");
|
||||||
Logger.info("Removing Block Populators...");
|
Logger.info("Removing Block Populators...");
|
||||||
Bukkit.getServer().getWorlds().forEach((world -> {
|
Bukkit.getServer().getWorlds().forEach((world -> {
|
||||||
List<BlockPopulator> populators = new ArrayList<>(world.getPopulators());
|
List<BlockPopulator> populators = new ArrayList<>(world.getPopulators());
|
||||||
@ -478,9 +478,9 @@ public class Loader {
|
|||||||
}));
|
}));
|
||||||
}));
|
}));
|
||||||
Logger.info("");
|
Logger.info("");
|
||||||
Logger.info("§cUnloading Extensions...");
|
Logger.info("&cUnloading Extensions...");
|
||||||
ExtensionManager.unloadExtensions();
|
ExtensionManager.unloadExtensions();
|
||||||
Logger.info("§fBye! :)");
|
Logger.info("&fBye! :)");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user