From 100f2c7e56cac124bd627d3671092a2d8cff198c Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 19 Oct 2013 00:27:07 +0200 Subject: [PATCH] Added a warning message if the server is running NoCheatPlus without CompatNoCheatPlus --- Changelog.txt | 1 + src/main/java/com/gmail/nossr50/mcMMO.java | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 3df8f7cdd..6f1bee34e 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -30,6 +30,7 @@ Version 1.4.07-dev + Added ability to give custom names to items in treasures.yml - use the key "Custom_Name" to set, expects a string. + Added ability to give lore to items in treasures.yml - use the key "Lore" to set, expects a list of strings. + Added Quartz and Name Tags to the default Excavation treasures + + Added a warning message if the server is running NoCheatPlus without CompatNoCheatPlus + Killing a custom entity will automatically add it to the custom entity config file with default values. = Fixed bug which allowed players to bypass fishing's exploit prevention = Fixed bug where FakeEntityDamageByEntityEvent wasn't being fired diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index 681ed7476..33d6330b6 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -78,6 +78,8 @@ public class mcMMO extends JavaPlugin { /* Plugin Checks */ private static boolean combatTagEnabled; private static boolean healthBarPluginEnabled; + private static boolean noCheatPlusPluginEnabled; + private static boolean compatNoCheatPlusPluginEnabled; private static boolean mcpcEnabled; // Config Validation Check @@ -120,9 +122,11 @@ public class mcMMO extends JavaPlugin { return; } + mcpcEnabled = getServer().getName().equals("MCPC+"); combatTagEnabled = getServer().getPluginManager().getPlugin("CombatTag") != null; healthBarPluginEnabled = getServer().getPluginManager().getPlugin("HealthBar") != null; - mcpcEnabled = getServer().getName().equals("MCPC+"); + noCheatPlusPluginEnabled = getServer().getPluginManager().getPlugin("NoCheatPlus") != null; + compatNoCheatPlusPluginEnabled = getServer().getPluginManager().getPlugin("CompatNoCheatPlus") != null; if (mcpcEnabled) { checkModConfigs(); @@ -132,6 +136,11 @@ public class mcMMO extends JavaPlugin { getLogger().info("HealthBar plugin found, mcMMO's healthbars are automatically disabled."); } + if (noCheatPlusPluginEnabled && !compatNoCheatPlusPluginEnabled) { + getLogger().warning("NoCheatPlus plugin found, but CompatNoCheatPlus was not found!"); + getLogger().warning("mcMMO will not work properly alongside NoCheatPlus without CompatNoCheatPlus"); + } + databaseManager = DatabaseManagerFactory.getDatabaseManager(); registerEvents();