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/WorkaroundsListener.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/WorkaroundsListener.java')
-rw-r--r-- | EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/WorkaroundsListener.java | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/WorkaroundsListener.java b/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/WorkaroundsListener.java deleted file mode 100644 index 7191c0c23..000000000 --- a/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/WorkaroundsListener.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.earth2me.essentials.anticheat.checks; - -import com.earth2me.essentials.anticheat.EventManager; -import com.earth2me.essentials.anticheat.config.ConfigurationCacheStore; -import java.util.Collections; -import java.util.List; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerMoveEvent; -import org.bukkit.event.player.PlayerToggleSprintEvent; - - -/** - * Only place that listens to Player-teleport related events and dispatches them to relevant checks - * - */ -public class WorkaroundsListener implements Listener, EventManager -{ - public WorkaroundsListener() - { - } - - @EventHandler(priority = EventPriority.HIGHEST) - public void playerMove(final PlayerMoveEvent event) - { - // No typo here. I really only handle cancelled events and ignore others - if (!event.isCancelled()) - { - return; - } - - // Fix a common mistake that other developers make (cancelling move - // events is crazy, rather set the target location to the from location) - event.setCancelled(false); - event.setTo(event.getFrom().clone()); - } - - @EventHandler(priority = EventPriority.HIGHEST) - public void toggleSprint(final PlayerToggleSprintEvent event) - { - // Some plugins cancel "sprinting", which makes no sense at all because - // it doesn't stop people from sprinting and rewards them by reducing - // their hunger bar as if they were walking instead of sprinting - if (event.isCancelled() && event.isSprinting()) - { - event.setCancelled(false); - } - } - - public List<String> getActiveChecks(ConfigurationCacheStore cc) - { - return Collections.emptyList(); - } -} |