Commit Graph

246 Commits

Author SHA1 Message Date
asofold
52b28bdfb4 [Bleeding] Add "sprintinggrace" concept to moving.
This allows setting a grace-period which allows that amount of seconds
longer sprinting even though the food level just dropped below minimum
for sprinting. This will hopefully reduce seldom false positives as well
as improve compatibility with other plugins like Heroes, which have
skills that add velocity and at the same time decrease the food level
below sprinting-limit (fp on landing).
2013-05-14 19:39:45 +02:00
asofold
384c3483ca Add configuration for ender-pearl checks to the combined section. 2013-05-03 11:13:53 +02:00
asofold
3e96d7d9a2 [Experimental] Add "strictinvalidation" flag to velocity config.
This allows triggering the invalidation for the active horizontal
velocity at half of the allowed speed instead of full, in case of
setting the flag to false.
2013-05-01 22:44:19 +02:00
asofold
00a240ff9a Bind chunk loading debug messages to the debug flag as well. 2013-04-30 19:26:41 +02:00
asofold
a493da7ff7 Don't deal fall damage for causing passable violations moving from
ground.

This hopefully prevents a range of login/teleport problems with nofall.
Does not resolve those for tp/login into air.
2013-04-29 00:39:00 +02:00
asofold
634ca39824 Load chunks on players joining (configurable). 2013-04-27 00:32:07 +02:00
asofold
22ffb43ddf [BLEEDING] Testing: ender-pearl glitch use (first sketch, read details).
* This method is "hard-coded" and not configurable yet.
* Prevent throwing and teleporting into blocks directly, prevent
the second throw on glitching into a one thick ceiling (might lead to
lots of passable violations at present).
* If stuck in a block with the feet (not sand/gravel) without being on
ground, throwing is prevented.
* Some dependencies were updated, hopefully without conflicts for
backwards compatibility (untested).
2013-04-22 21:46:49 +02:00
asofold
3b4352c044 [BLEEDING] Add AutoSign check (first sketch). 2013-04-22 04:38:14 +02:00
asofold
f4b88b3309 Adjust critical, remove remainders of old god-mode check.
Critical:
* Add tags.
* Add extra flag (redundant to MediumLiftOff, just indicating what the
real lift off was, might need redesign, since m-lo is modified
sometimes.)
2013-04-22 01:14:05 +02:00
asofold
6b4421dc81 [BLEEDING] Add low jump detection, prevent critical hits if in low jump
phase.
2013-04-21 22:20:28 +02:00
asofold
19ddaefb4c Fix crop trampling being disabled by anticriticals. 2013-04-21 21:23:51 +02:00
asofold
e26aec2cbd Make login denial configurable for the illegal-move checking. 2013-04-21 19:52:55 +02:00
asofold
2334bc9f22 Hover check: Check if chunks are loaded before triggering a violation. 2013-04-21 19:48:04 +02:00
asofold
de5f152df9 [BLEEDING] Flesh out aspects of ComponentRegistry.
* Fixes data removal ignoring chat.logins and chat.text for a part.
* Move some components interfaces and ReflectionUtil to NCPCommons.
* Unregister components in reverse order.
* Add ComponentRegistryProvider for generic sub-registries (DataManager
for instance).
* Add IHoldSUbComponents for delayed sub-component registration
(convenient for iteration over parent-components with later registration
of sub components not missing out any registered parent components for
those). [Partly implemented: Using this during runtime does not yet
work, only used in onEnable.]
* Let CheckListener implement IHoldSubComponents and use this with
addCheck to register the queued checks after all the listeners.
* Register the core system components in a bunch before the
CheckListenerS, to allow sub-registries to work directly and to allow
getAPI().addComponent on the plugin class during construction of
CheckListeners.
2013-04-15 16:11:08 +02:00
asofold
290fc0feb0 Two fixes for MovingListener/join.
* Catch a null location.
* Set the set back after resetting fly data, if a location is given.
2013-04-05 21:34:57 +02:00
asofold
b09f2e511c Missing vehicle-exit: Always clear nofall data (leave that to MC). 2013-03-20 07:04:12 +01:00
asofold
d659dd7f26 Attempt to work around missing VehicleExit events with latest CB dev
builds.
2013-03-20 06:15:17 +01:00
asofold
9e16d8f2ef Remove debug message (...). 2013-03-16 04:34:25 +01:00
asofold
171f2aa932 Re-order conditions. 2013-03-16 04:33:47 +01:00
asofold
ab99e871f9 Add heuristic for the THORNS enchantment. 2013-03-16 04:25:16 +01:00
asofold
7d17fb67b4 Suppress deprecation warning for now. 2013-03-16 00:16:58 +01:00
asofold
0fc3b54db9 Also catch getSlot() < 0 for the InventoryClickEvent. 2013-03-14 21:30:19 +01:00
asofold
1b811716e2 Inventory.FastClick: Fix vl not adding, prepare for 1.5. 2013-03-14 12:21:38 +01:00
asofold
325d47fcbc Ignore "outside" clicks, i.e. slots outside of the inventory slot range. 2013-03-14 11:02:41 +01:00
asofold
9de6175874 New FastClick (inventory) check.
This check is less strict on short term but more strict on medium term.
Keeps track of one second (200 ms resolution).
2013-03-14 10:44:29 +01:00
asofold
15f08f13a9 Prepare 1.5 blocks with block flags. Add unused stuff.
More like a safety commit.
1. Add compatibility block flags for MC 1.5 blocks.
2. Add commented out / unused stuff (not really for 1.5).
2013-03-13 10:16:56 +01:00
asofold
c075e67f8f Make fight.reach distances (survival) configurable. 2013-03-13 09:20:17 +01:00
asofold
a04f4ad882 Adjust lostgorund/fastedge to catch more vacc fp. 2013-03-13 06:46:19 +01:00
asofold
1ec7f997cf Just add to first bucket, since update(...) has been called. 2013-03-13 06:20:14 +01:00
asofold
a5ed780542 Attempt to fix issues with too low valid-count for velocity. 2013-03-13 05:08:23 +01:00
asofold
25e4cb3b05 Fix allowed h-dist in water (downstream).
Previously this was not applied in the "after-failure" h-dist estimation
 with permission checking.
2013-03-13 03:19:14 +01:00
asofold
1ad08b3729 Velocity: Decrease validity counter once activated. 2013-03-13 02:55:54 +01:00
asofold
bb38ff5a1b Add maximum activation ticks for velocity (queued). 2013-03-13 02:55:24 +01:00
asofold
310b62384f Fix aspects with jump potion-effects.
1. Set the correct effect strength in data.
2. Adjust workarounds to catch jump effect II on fences and similar.
[Might need more specialized checking for performance reasons.]
2013-03-12 21:55:04 +01:00
asofold
fc788f55c4 [Bleeding] Optimize preparation for PlayerLocation use.
1. Only collect flags for survivalfly.
2. Set all properties for the to location if it is the same position as
the from location.
2013-03-12 09:59:52 +01:00
asofold
a7c4539783 Let NoFall be more generous with the on-ground search.
Extend xz and y margins.
2013-03-12 08:19:19 +01:00
asofold
7b4fe7acc4 Regroup lost-ground workarounds. Fix some aspects.
Check some preconditions in the check method, delegate to different
methods for different cases, also to have smaller method bodies.

IsAboveStairs is only checked for "mild" y-distances. For faster
descending an individual edge-check has been added.
2013-03-12 07:55:50 +01:00
asofold
409ba0b2ee Don't check god mode for dead players. 2013-03-12 07:05:49 +01:00
asofold
186eec69ab Moving: Only set sfDirty flag if velocity is really used. 2013-03-11 19:18:22 +01:00
asofold
ea0b26ad19 SurvivalFly: adjust "swimup" workarounds.
1. After-failure workarounds checking (performance).
2. Hopefully fixes issues with flowing water and stairs.
2013-03-11 18:42:45 +01:00
asofold
d4616f415d [Bleeding] Various fixes for collision logic and consequent changes.
General:
- Wrong flags checked or flags checked in the wrong way.
- isPassable should use collidesBlock.
- collidesBlock should not see high-value-only matches as collisions.
- collidesCenter returns true for the case of collision (...).

Liquid blocks:
- New flag introduced to model rough liquid height for flowing liquids.
- One more workaround condition for moving in/off liquids.
- Use exact bounding-box for liquids checking in PlayerLocation.
- Check for water first in PlayerLocation.isInLiquid.

Other:
- Alter some block flags and workarounds.
- (other)
2013-03-11 06:01:39 +01:00
asofold
4ff54f0020 Revert setting set-back-y to block bottom on some occasions. 2013-03-11 03:23:10 +01:00
asofold
0c59487a0a Use the same Location instance for passable and nofall. 2013-03-09 19:42:16 +01:00
asofold
434a83c398 [BLEEDING] Adjust the set-back y-coordinate to block bottom for some
cases.
2013-03-09 03:53:51 +01:00
asofold
8d9e2fdadc Add more detailed tags to lost-ground workarounds. 2013-03-09 03:53:06 +01:00
asofold
7eab369a00 Alter small-range-tp margin. Add debug info for teleport and setback-y. 2013-03-09 03:04:50 +01:00
asofold
498f23e704 Reduce amount fed to improbable by fight.reach. 2013-03-09 00:34:04 +01:00
asofold
de4faa392d Allow fight.speed to create improbable violations for higher violation
levels.

Might need configuration/testing.
2013-03-08 23:26:57 +01:00
asofold
61bc88b64f Add "strict" method to fight.direction.
Set as default, the "strict" option will also check the angle between
the viewing direction and the direction towards the target. This might
not stay the default method, but it does help against auras in close
combat.
2013-03-08 23:24:51 +01:00
asofold
926556a358 Implement JoinLeaveListener with MovingListener and ChatListener. 2013-03-08 17:28:35 +01:00