summaryrefslogtreecommitdiffstats
path: root/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/actions/Action.java
blob: aa72472ffb00147bdc7eff2723f19850eac08883 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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;
	}
}