summaryrefslogtreecommitdiffstats
path: root/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/actions/Action.java
diff options
context:
space:
mode:
authormd_5 <md_5@bigpond.com>2012-03-12 10:39:36 +1100
committermd_5 <md_5@bigpond.com>2012-03-12 10:39:36 +1100
commit78f4820876f42f7b50bf88f64afd45bee939e4e4 (patch)
tree317cd3bcc63fc9e86a6efbcb5e13a50ed9efbaaf /EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/actions/Action.java
parent26409058467e9f34aa65a08df3c68a58129d22ba (diff)
downloadEssentials-78f4820876f42f7b50bf88f64afd45bee939e4e4.tar
Essentials-78f4820876f42f7b50bf88f64afd45bee939e4e4.tar.gz
Essentials-78f4820876f42f7b50bf88f64afd45bee939e4e4.tar.lz
Essentials-78f4820876f42f7b50bf88f64afd45bee939e4e4.tar.xz
Essentials-78f4820876f42f7b50bf88f64afd45bee939e4e4.zip
Initial formatted and slightly tweaked version of @evenprime 's NoCheat. Will be intergrated into the main Essentials as soon as possible
Diffstat (limited to 'EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/actions/Action.java')
-rw-r--r--EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/actions/Action.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/actions/Action.java b/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/actions/Action.java
new file mode 100644
index 000000000..aa72472ff
--- /dev/null
+++ b/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/actions/Action.java
@@ -0,0 +1,32 @@
+package com.earth2me.essentials.anticheat.actions;
+
+
+/**
+ * An action gets executed as the result of a failed check. If it 'really' gets executed depends on how many executions
+ * have occurred within the last 60 seconds and how much time was between this and the previous execution
+ *
+ */
+public abstract class Action
+{
+ /**
+ * Delay in violations. An "ExecutionHistory" will use this info to make sure that there were at least "delay"
+ * attempts to execute this action before it really gets executed.
+ */
+ public final int delay;
+ /**
+ * Repeat only every "repeat" seconds. An "ExecutionHistory" will use this info to make sure that there were at
+ * least "repeat" seconds between the last execution of this action and this execution.
+ */
+ public final int repeat;
+ /**
+ * The name of the action, to identify it, e.g. in the config file
+ */
+ public final String name;
+
+ public Action(String name, int delay, int repeat)
+ {
+ this.name = name;
+ this.delay = delay;
+ this.repeat = repeat;
+ }
+}