diff options
4 files changed, 27 insertions, 36 deletions
diff --git a/EssentialsAntiCheat/README.txt b/EssentialsAntiCheat/README.txt deleted file mode 100644 index 73ad6d1e9..000000000 --- a/EssentialsAntiCheat/README.txt +++ /dev/null @@ -1,9 +0,0 @@ -Copyright (c) 2012 Wilfried Pasquazzo (Evenprime) -<wilfried.pasquazzo@gmail.com> - -# Dual-Licensed - you may freely choose between (or use both): -# -# 1) GPL v3 (see LICENSE_GPL3.txt) -# 2) MIT (see LICENSE_MIT.txt) -# -#
\ No newline at end of file diff --git a/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/NoCheat.java b/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/NoCheat.java index 666a04332..29e1cdc22 100644 --- a/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/NoCheat.java +++ b/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/NoCheat.java @@ -8,6 +8,7 @@ import com.earth2me.essentials.anticheat.checks.fight.FightCheckListener; import com.earth2me.essentials.anticheat.checks.inventory.InventoryCheckListener; import com.earth2me.essentials.anticheat.checks.moving.MovingCheckListener; import com.earth2me.essentials.anticheat.command.CommandHandler; +import com.earth2me.essentials.anticheat.config.ConfPaths; import com.earth2me.essentials.anticheat.config.ConfigurationCacheStore; import com.earth2me.essentials.anticheat.config.ConfigurationManager; import com.earth2me.essentials.anticheat.config.Permissions; @@ -30,12 +31,6 @@ import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.plugin.java.JavaPlugin; -/** - * - * NoCheat - * - * Check various player events for their plausibility and log/deny them/react to them based on configuration - */ public class NoCheat extends JavaPlugin implements Listener { private ConfigurationManager conf; @@ -201,29 +196,32 @@ public class NoCheat extends JavaPlugin implements Listener @EventHandler public void onPlayerJoin(PlayerJoinEvent event) { - Player p = event.getPlayer(); - String message = ""; - if (!p.hasPermission(Permissions.ZOMBES_FLY)) + if (getConfig().getBoolean(ConfPaths.DISABLE_MODS)) { - message += "§f §f §1 §0 §2 §4"; // Zombes fly - } - if (!p.hasPermission(Permissions.ZOMBES_CHEAT)) - { - message += "§f §f §2 §0 §4 §8"; // Zombes cheat - } - if (!p.hasPermission(Permissions.CJB_FLY)) - { - message += "§3 §9 §2 §0 §0 §1"; // CJB fly - } - if (!p.hasPermission(Permissions.CJB_XRAY)) - { - message += "§3 §9 §2 §0 §0 §2"; // CJB xray - } - if (!p.hasPermission(Permissions.CJB_MINIMAP)) - { - message += "§3 §9 §2 §0 §0 §3"; // CJB minimap players + Player p = event.getPlayer(); + String message = ""; + if (!p.hasPermission(Permissions.ZOMBES_FLY)) + { + message += "§f §f §1 §0 §2 §4"; // Zombes fly + } + if (!p.hasPermission(Permissions.ZOMBES_CHEAT)) + { + message += "§f §f §2 §0 §4 §8"; // Zombes cheat + } + if (!p.hasPermission(Permissions.CJB_FLY)) + { + message += "§3 §9 §2 §0 §0 §1"; // CJB fly + } + if (!p.hasPermission(Permissions.CJB_XRAY)) + { + message += "§3 §9 §2 §0 §0 §2"; // CJB xray + } + if (!p.hasPermission(Permissions.CJB_MINIMAP)) + { + message += "§3 §9 §2 §0 §0 §3"; // CJB minimap players + } + p.sendMessage(message); } - p.sendMessage(message); } public void setFileLogger(Logger logger) diff --git a/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/config/ConfPaths.java b/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/config/ConfPaths.java index 66473633d..c830b390b 100644 --- a/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/config/ConfPaths.java +++ b/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/config/ConfPaths.java @@ -16,6 +16,7 @@ public abstract class ConfPaths public final static String LOGGING_LOGTOINGAMECHAT = LOGGING + "ingamechat"; public final static String LOGGING_SHOWACTIVECHECKS = LOGGING + "showactivechecks"; public final static String LOGGING_DEBUGMESSAGES = LOGGING + "debugmessages"; + public final static String DISABLE_MODS = "disableMods"; private final static String CHECKS = "checks."; diff --git a/EssentialsAntiCheat/src/config.yml b/EssentialsAntiCheat/src/config.yml index 81882dea8..ecbbb17c2 100644 --- a/EssentialsAntiCheat/src/config.yml +++ b/EssentialsAntiCheat/src/config.yml @@ -8,6 +8,7 @@ logging: file: true console: true ingamechat: true +disableMods: false checks: inventory: drop: |