diff options
author | ementalo <ementalodev@gmx.co.uk> | 2012-07-17 12:26:55 +0100 |
---|---|---|
committer | ementalo <ementalodev@gmx.co.uk> | 2012-07-17 14:21:03 +0100 |
commit | a661bce7b3de3f53e2b7b79c1283f0affa6fe9c3 (patch) | |
tree | 2aa10b6300f6c8d3cb2b298c124180fade74857a /EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/blockbreak/BlockBreakCheck.java | |
parent | 3c385e69271dfe8530fadc3f67e13ee495e4b0e1 (diff) | |
parent | 9f05e43ecf8e6e1a8fcaef757678e762f0d82573 (diff) | |
download | Essentials-a661bce7b3de3f53e2b7b79c1283f0affa6fe9c3.tar Essentials-a661bce7b3de3f53e2b7b79c1283f0affa6fe9c3.tar.gz Essentials-a661bce7b3de3f53e2b7b79c1283f0affa6fe9c3.tar.lz Essentials-a661bce7b3de3f53e2b7b79c1283f0affa6fe9c3.tar.xz Essentials-a661bce7b3de3f53e2b7b79c1283f0affa6fe9c3.zip |
Merge of server-layer branch
Diffstat (limited to 'EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/blockbreak/BlockBreakCheck.java')
-rw-r--r-- | EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/blockbreak/BlockBreakCheck.java | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/blockbreak/BlockBreakCheck.java b/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/blockbreak/BlockBreakCheck.java deleted file mode 100644 index 6e349c85c..000000000 --- a/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/blockbreak/BlockBreakCheck.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.earth2me.essentials.anticheat.checks.blockbreak; - -import com.earth2me.essentials.anticheat.NoCheat; -import com.earth2me.essentials.anticheat.NoCheatPlayer; -import com.earth2me.essentials.anticheat.checks.Check; -import com.earth2me.essentials.anticheat.config.ConfigurationCacheStore; -import com.earth2me.essentials.anticheat.data.DataStore; - - -/** - * Abstract base class for BlockBreakChecks. Provides some static convenience methods for retrieving data and config - * objects for players - * - */ -public abstract class BlockBreakCheck extends Check -{ - private static final String id = "blockbreak"; - - public BlockBreakCheck(NoCheat plugin, String name) - { - super(plugin, id, name); - } - - /** - * Get the "BlockBreakData" object that belongs to the player. Will ensure that such a object exists and if not, - * create one - * - * @param player - * @return - */ - public static BlockBreakData getData(NoCheatPlayer player) - { - DataStore base = player.getDataStore(); - BlockBreakData data = base.get(id); - if (data == null) - { - data = new BlockBreakData(); - base.set(id, data); - } - return data; - } - - /** - * Get the BlockBreakConfig object that belongs to the world that the player currently resides in. - * - * @param player - * @return - */ - public static BlockBreakConfig getConfig(NoCheatPlayer player) - { - return getConfig(player.getConfigurationStore()); - } - - public static BlockBreakConfig getConfig(ConfigurationCacheStore cache) - { - BlockBreakConfig config = cache.get(id); - if (config == null) - { - config = new BlockBreakConfig(cache.getConfiguration()); - cache.set(id, config); - } - return config; - } -} |