diff options
author | md_5 <md_5@bigpond.com> | 2012-03-12 10:39:36 +1100 |
---|---|---|
committer | md_5 <md_5@bigpond.com> | 2012-03-12 10:39:36 +1100 |
commit | 78f4820876f42f7b50bf88f64afd45bee939e4e4 (patch) | |
tree | 317cd3bcc63fc9e86a6efbcb5e13a50ed9efbaaf /EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/fight/FightData.java | |
parent | 26409058467e9f34aa65a08df3c68a58129d22ba (diff) | |
download | Essentials-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/checks/fight/FightData.java')
-rw-r--r-- | EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/fight/FightData.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/fight/FightData.java b/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/fight/FightData.java new file mode 100644 index 000000000..9f3a5a5d4 --- /dev/null +++ b/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/fight/FightData.java @@ -0,0 +1,40 @@ +package com.earth2me.essentials.anticheat.checks.fight; + +import com.earth2me.essentials.anticheat.DataItem; +import net.minecraft.server.Entity; + + +/** + * Player specific data for the fight checks + * + */ +public class FightData implements DataItem +{ + // Keep track of the violation levels of the checks + public double directionVL; + public double noswingVL; + public double reachVL; + public int speedVL; + public double godmodeVL; + public double instanthealVL; + // For checks that have penalty time + public long directionLastViolationTime; + public long reachLastViolationTime; + // godmode check needs to know these + public long godmodeLastDamageTime; + public int godmodeLastAge; + public int godmodeBuffer = 40; + // last time player regenerated health by satiation + public long instanthealLastRegenTime; + // three seconds buffer to smooth out lag + public long instanthealBuffer = 3000; + // While handling an event, use this to keep the attacked entity + public Entity damagee; + // The player swung his arm + public boolean armswung = true; + // For some reason the next event should be ignored + public boolean skipNext = false; + // Keep track of time and amount of attacks + public long speedTime; + public int speedAttackCount; +} |