Commit Graph

105 Commits

Author SHA1 Message Date
asofold
ea0e9e1ade Make FlyingFrequency a standard check in NCPCore. 2015-11-23 07:54:28 +01:00
asofold
7d57e68578 Log null data as "(incompatible data)". 2015-11-23 06:41:22 +01:00
Dan Mulloy
fd2ee45481 Use my maven repo and the latest release of ProtocolLib 2015-11-22 20:29:46 -05:00
asofold
c1cd680108 Feed combined.improbable from net.attackfrequency.
Adds the infrastructure to the TickTask.
2015-11-16 13:05:03 +01:00
asofold
8ff29c2575 Add check: net/AttackFrequency (without improbable). 2015-11-16 12:30:22 +01:00
asofold
0f1a5345f8 Always update last received time. 2015-11-16 09:57:01 +01:00
asofold
af5fbd900a Move prefixes to loggers. 2015-11-15 02:44:01 +01:00
asofold
8de7907522 [BLEEDING] Split off untracked moves. Elaborate on slime blocks.
MISSING:
* Micro move onto ground, fall distance resets before sf check is run.

Done:
* Split PlayerMoveEvent processing to from -> loc + from -> to. Just if
from isn't the same coordinates as player.getLocation. This
reduces the complexity of workarounds.
* You do take fall damage falling onto slime blocks while sneaking.
* Queue bounce effect, only if the move is valid. Skip NoFall then.
* Apply bounce effect once moving up, to allow overriding.
* Cover more odd cases.

Unrelated:
* Use data.debug instead of cc.debug.
2015-10-21 01:13:37 +02:00
asofold
1e70dc0730 Add essential configurability for "stray-packet" cancelling (TP-ACK). 2015-10-18 17:26:43 +02:00
asofold
343b5ac9e3 [BLEEDING] Teleports: Cancel incoming position, until receiving an ACK.
* Queue outgoing positions in order to detect ACK on incoming.
* Since we can't detect relative teleports, positions are only queued,
if they match an absolute location from a teleport event (Bukkit).
* The queue is kept simple: only store the latest position.
* Cancel incoming flying/pos/look until ACK is received.

Missing:
* Are yaw/pitch are ever sent back changed.
* Configuration to turn it off.
* Might use this to just skip all violation handling until ACK.
2015-10-18 16:35:02 +02:00
asofold
b749dfdc42 Fix npe. 2015-10-04 21:51:00 +02:00
asofold
7bcae640e9 Do debug log for block break and place and dig/place packets.
Dig/place is only logged if a debug flag is set in the config, it won't
activate with on-the-fly per player debug logging.
2015-10-03 00:21:37 +02:00
asofold
444fcb9761 Remove cancelling redundant packets, re-organize, debug log flying.
Cancelling redundant packets has to big problems:
* The normal case is to not run in the primary thread.
* For legit players a missed micro move could mean that survivalfly can
not detect ground properly.

Better approaches could be:
* Cancel asynchronous packets if they match the last sent one (only
simple hacks).
* Check for moves passing block borders, request block shapes and such
from the main thread.
* Detect actual cheating or unusual patterns instead.
* Queue packets for processing in the main thread.

Missing:
* Actually detect ACK packets for previous outgoing teleports.
* Do something upon detecting illegal coordinates (asynchronous
disconnect? queue kicking, config).
2015-09-27 21:54:36 +02:00
asofold
f2783cf1f5 Do check for the other types of flying packets. 2015-09-07 01:11:55 +02:00
asofold
866a2248cf Use tabs for all the pom.xml. 2015-08-01 00:58:33 +02:00
asofold
7da874ad66 Attempt to deploy only the final plugin jar. 2015-07-30 11:27:30 +02:00
asofold
ab88b98704 [ProtocolLib] Add several missing sounds to block. Count cancellation. 2015-06-08 13:46:27 +02:00
asofold
81d10a314c Add comment on differing number of bukkit events vs. flying pacekts. 2015-02-16 11:56:15 +01:00
asofold
260ba01246 Use lastKeepAliveTime (NetData) in fight.godmode.
* Update lastKeepAliveTime from KeepAliveFrequency (even if that is
disabled).
* Update lastKeepAliveTime from FlyingFrequency too.
* Allow to test for feature tags efficiently.
2015-02-09 21:59:37 +01:00
asofold
85dcb33a98 Add KeepAliveFrequency check, add missing @GlobalConfig.
Limit the number of keep-alive packets to one per second.
2015-02-09 16:55:38 +01:00
asofold
86803af59a Catch asynchronous events from ProtocolLib. 2015-02-07 22:57:52 +01:00
asofold
e0a8ef21d6 Revert module dependency versions to 1.1-SNAPSHOT.
(LATEST would use the old static ones.)
2015-02-06 02:05:48 +01:00
asofold
a7127336a8 Use LATEST as version for internal dependencies. 2015-02-04 23:42:05 +01:00
asofold
71513f2d0c Use ListenerPriority.LOW with ProtocolLib. 2015-02-04 19:05:43 +01:00
asofold
2cecd50961 Change all "static" pom versions to "1.1-SNAPSHOT", to allow deploy. 2015-02-04 18:49:52 +01:00
asofold
eacd09be13 Fix ProtocolLib hooks package names. 2015-01-30 22:42:19 +01:00
asofold
586013a907 [BREAKING] Simplify Check.executeActions, remove getParameterMap.
* The primary thread is now detected in Check.executeActions.
* ViolationData.chainParameter allows for one-statement action-execution
with chaining.
2015-01-30 21:12:40 +01:00
asofold
86732764e3 [BLEEDING] Integrate net checks into the check system.
* Extend CheckConfigFactory with a remove-all method.
* DataManager.clearConfigs() now uses CheckType for getting factories.
* Split off Check.hasBypass method to check exemption + permission.
* Allow null permissions in CheckType (interpret as no bypass).
* Add Check types for FlyingFrequency and SoundDistance.
* Add exemption and actions to FlyingFrequency, alter defaults.
2015-01-30 16:10:43 +01:00
asofold
f3973cd043 Move the net package inside of checks. 2015-01-27 00:52:28 +01:00
asofold
6a8a0f3593 Use the boolean value here. 2015-01-21 23:41:37 +01:00
asofold
d1b4d51b4a At least a second is necessary to skip. 2015-01-21 17:39:34 +01:00
asofold
f8cbe404f5 Alter FlyingFrequency to match redundancy vs. MovingData (toX, ...).
First attempt to detect if a moving event would fire. This might not be
100% accurate, as a) we can'T really know and b) lastTo is not minitored
in the most reliable way (e.g. teleport on highest priority, resetting
logic favors set-backs).
2015-01-21 01:45:54 +01:00
asofold
f79cda4442 Optimize FlyingFrequency, add more structure and comments.
* Use a HashMap for data, as we intend to use the primary thread.
* Move redundant move checking into a method.
* Ignore on-ground, if it is sent too often.
* Log if redundant move checking has to be disabled.
2015-01-20 18:10:37 +01:00
asofold
205b351dff Catch more edge cases for setup of ProtocolLib hooks. 2015-01-17 05:25:37 +01:00
asofold
0e3295be29 Wrong constructor. 2015-01-08 03:50:50 +01:00
asofold
dd87ab7ccd [BLEEDING] Net checks: Cancel redundant flying packets. Better config.
FlyingFrequency: if frequency is above 20/sec, redundant packets will be
cancelled (experimental, configurable).
2015-01-08 03:35:25 +01:00
asofold
41e9d89efa Add info about version-dependent features to the "ncp version" command.
* Add methods to NoCheatPlusAPI to add/set/get version tags.
* Display all tags in the ncp reload command.
* Alter test framework to set a dummy API.
* Add tags for blocks, net checks, FastConsume.
2015-01-05 16:34:07 +01:00
asofold
39cc75c162 Spaces. 2015-01-05 15:43:49 +01:00
asofold
878848c4d1 Cancel flying packets with null players. 2014-12-17 15:57:22 +01:00
asofold
37c1da73ff Rename LogUtil to StaticLog. 2014-11-17 11:25:51 +01:00
asofold
95763d35c8 Add after-failure config flag checks for net/packet checks.
Obviously these have been forgotten, but are not marked with
@GlobalConfig. Using after-failure checking, because the raw config
getting and accessing might be slightly heavy-ish.
2014-10-31 11:03:23 +01:00
asofold
289da86c35 Add basic (mostly global) configuration for net checks.
Currently the parameters except for the "active" flag are not available
per-world, but this can be added later.
2014-07-27 23:21:04 +02:00
asofold
02eea231b7 Set max. sound distance to 320, in order to have a protective effect.
This is about the max. view distance, will be configurable later on.
2014-07-27 21:02:44 +02:00
asofold
c6c904254f Feed some counters for debugging purposes.
Some might get removed soon.

* Various sorts of silent cancelling (probably not caught all).
* Count PlayerMoveEvent with look/pos/look+pos changes.
2014-07-27 21:01:36 +02:00
asofold
a5ec614444 Add summary log message about added packet level hooks. 2014-07-16 16:30:26 +02:00
asofold
616e5436a2 Clear registered hooks on disable. + comments + messages. 2014-07-16 16:08:50 +02:00
asofold
7169788554 Simplify FlyingFrequency by using the cow map. 2014-07-16 15:49:23 +02:00
asofold
59fca0f43e Prefer to synchronize adding players.
Does not seem to be strictly necessary, because the data is comparably
light-weight and the data loss on some time slices would usually be
small.

Should be cleaner, as this is a seldom event (login, logout).
2014-07-16 14:42:18 +02:00
asofold
7b6305de78 Packet checks adjustments and renaming.
* More appropriate names.
SoundDistance
* Plus wither plus dragon.
* Horizontal distance.
2014-07-16 13:50:04 +02:00
asofold
288950edd4 Use predefined packet types, add comments. 2014-07-16 13:29:08 +02:00
asofold
bb8b8fc1f2 Quick adaptions/cleanups for packet level checking. 2014-07-15 23:58:48 +02:00
Scetch
1e6d69b50f Oops. This doesn't need to be there. 2014-07-15 17:17:49 -04:00
Scetch
a367c8f20c Prevent weather sound effect > 512 blocks away. 2014-07-15 17:14:45 -04:00
asofold
b956aab479 Remove the "warning on success" message. 2014-07-13 01:14:38 +02:00
asofold
04b82ad0a6 [BLEEDING] Peek into ProtocolLib to fight certain packet spam (3).
This lessens or removes most effects of spamming the PacketPlayInFlying
(3, legacy 10), such as "magnet" or "repell" effects.
2014-07-12 22:30:51 +02:00