Commit Graph

2806 Commits

Author SHA1 Message Date
asofold
c5d99f986a [BLEEDING] Fix block shape retrieval for 1.9. 2016-03-04 14:00:47 +01:00
asofold
62ea433a0f Confine the accepted Minecraft version for ProtocolLib 3.7 more.
9be2cd2400 (diff-2f1ecdb100c80df342f0249f8ebacbb1R83)
2016-03-03 22:43:38 +01:00
asofold
c22126449b [BLEEDING] Dedicated MCAccess for 1.9.
This won't cover all effects of internal changes, some blocks might be
interpreted wrongly still, some shapes may have changed in an
incompatible way (e.g. skulls).
2016-03-03 20:11:46 +01:00
asofold
c800b55d62 Prepare detecting other flying methods. Accidental import organize. 2016-03-03 16:48:55 +01:00
asofold
7d2c1ce1f8 Re-enable split move handling for MC 1.9. 2016-03-03 15:45:48 +01:00
asofold
9be2cd2400 [BLEEDING] Allow ProtocolLib 3.7 and disable SoundDistance on MC 1.9. 2016-03-02 19:49:02 +01:00
asofold
3c3ae4b351 Quick workaround for split moves (disable handling).
https://hub.spigotmc.org/jira/browse/SPIGOT-1646
2016-03-02 18:53:20 +01:00
asofold
d91a37256c Set version to 3.14.0-SNAPSHOT, due to a major MC version change. 2016-03-02 18:32:43 +01:00
asofold
bb6672630e Delegate testing for presence and level to generic methods. 2016-02-28 22:10:30 +01:00
asofold
557373ad0e Fix NPE with time running backwards. 2016-02-18 10:03:51 +01:00
asofold
5f41715fe2 [BLEEDING] Add early check for extreme moves (sub check of sf/cf). 2016-02-16 12:18:02 +01:00
asofold
10a1d1ffed Allow using blocks with boat in hand. 2016-02-16 12:07:44 +01:00
asofold
4599194eb0 Clarify javadocs. 2016-02-16 10:46:42 +01:00
asofold
e958e6ef7a Add Check.executeActions with IPenaltyList as extra argument. 2016-02-14 13:35:19 +01:00
asofold
0915acdee6 Use a provided interface to fill in input-specific penalties.
This seems to be more appropriate, for the case of multiple checks
triggering, but also for better performance, in case the check doesn't
even support input-specific penalties.
2016-02-12 00:51:18 +01:00
asofold
6d20b92ab6 Update readme (ProtocolLib). 2016-02-10 10:29:49 +01:00
asofold
851203edb9 [BREAKING][BLEEDING] Adjust the API to the upcoming penalty framework.
This is a first step in, which doesn't change the default behavior,
however it might break plugins that rely on certain internals.

PenaltyAction allows to do something with probabilities to consider,
including the possibility to select the first applicable penalty or
applying several penalties. There will be player-specific penalties,
which are applied during ViolationData.executeActions always, and there
will be input-specific penalties, e.g. for applying within the event
listener.

Potentially breaking:
* Return value of executeActions is now void for Action + ViolationData.
* Return value of Check.executeActions is ViolationData now.
* CancelAction is now extending PenaltyAction.
* CancelPenalty may cancel, but might not, due to probability.
* IViolationInfo.hasCancel -> deprecated, now returns willCancel().
* IViolationInfo.willCancel is now used, applicable penalties are
estimated on creation of ViolationData.
* Custom actions can no longer be used to cause cancel. Only penalties
can do so now (due to the return type change). CancelAction is still
there to keep a simple action for canceling.

Not yet:
* InputSpecificPenalty support for fight checks and using them in the
default actions.
* Configuration for penalties (currently only a plugin could override
the action factories, later penalties may have a probability to apply,
reference each other, allow first match, apply several at once).
2016-02-10 00:28:57 +01:00
asofold
8d6b930166 isHeadObstructed: Throw an IllegalArgumentException on margin < 0.
(Shouldn't fix anything.)
2016-02-09 14:46:07 +01:00
asofold
14e4620b76 Fix violation being added twice for display. 2016-02-08 20:36:16 +01:00
asofold
5e1c71b451 Just start small (Bukkit.getServer() fails on tests). 2016-02-08 01:53:40 +01:00
asofold
5d72a51001 Fix hash code use. 2016-02-08 01:35:24 +01:00
asofold
302b1ec824 PlayerPortalEvent: add to debug log, don't reset data if to is null. 2016-02-08 01:10:34 +01:00
asofold
f6a004015d [BLEEDING] Prepare 'data removal light' for time running backwards.
Introduce an interface to indicate if a CheckDataFactory or IRemoveData
instance can do something better than removing all data, in case the
system time ran backwards. An extra method in data manager is used
instead of clearAllData, which will test for implementation of that
interface. Concerns CheckDataFactory instances accessible via CheckType 
and IRemoveData instances registered with DataManager (via
NoCheatPlusAPI or directly).

Implementation details and related changes:
* TickTask: Let ActionFrequency handle time running backwards (spikes).
* NetData/Factory: Use HashMapLOW. Selectively clear/adjust.
* MovingData: Keep past move tracking (and some other).
2016-02-08 01:03:27 +01:00
asofold
40a83839e5 Clarify which versions of ProtocolLib are supported by NCP. 2016-02-02 00:09:21 +01:00
asofold
b2b5cd1e03 Set version to 3.13.8-SNAPSHOT for next iteration. 2016-01-31 17:38:52 +01:00
asofold
7360e33930 Set version to 3.13.7-RC for release.
Just to have something above the too old releases.
2016-01-31 17:15:19 +01:00
asofold
cc68a52ac4 Use one generic instance for Random. 2016-01-30 14:32:28 +01:00
asofold
9ef8399b15 Set version to 3.13.7-SNAPSHOT for next development iteration. 2016-01-29 00:16:27 +01:00
asofold
12d038eb66 Set version to 3.13.6-BETA for release. 2016-01-29 00:07:28 +01:00
asofold
f87870b1a8 Adjust things for a low ceiling. 2016-01-29 00:06:08 +01:00
asofold
d7b1748070 allviolations: Adjust message format to other debug messages. 2016-01-28 23:31:35 +01:00
asofold
6c977edacf Sketch out another storage map (not yet in use). 2016-01-28 22:51:41 +01:00
asofold
9aabb113e0 Change all protected visibility to private for now. 2016-01-28 12:33:04 +01:00
asofold
27e30ce29a Javadocs/comments. 2016-01-28 10:26:32 +01:00
asofold
f057f39fde Can't increase to 0. 2016-01-27 10:14:43 +01:00
asofold
f22bf88824 Adjust checking for 'head obstructed'.
Remove ambigue method, apply a different default margin, up to the next
block in steps of 0.25, if within 0.35 reach.

Default methods use this correction now, so some places might check with
too high a margin now.
2016-01-27 00:34:12 +01:00
asofold
36c018bc3c Use the bounds coordinates as intended. 2016-01-26 23:51:01 +01:00
asofold
c20d593d42 Fix stepping onto boats. 2016-01-26 21:36:37 +01:00
asofold
8985b67668 [BLEEDING] Reduce fp with blockinteract.visible using ProtocolLib.
Not entirely sure this will still protect from anything, shortish:
* Remove cancelling due to coarse pre-checks.
* Rather correct the end location back onto the end block somehow.
* Retry ray-tracing with the pitch and yaw of past flying packets.
* Let the direction check handle the off-too-far part and let people
blame that one for remaining amounts of false positives.

Missing:
* Should confine by distance to last move, perhaps.
2016-01-26 01:53:40 +01:00
asofold
e278e01a3c Replace ( and ) by ~ in /ncp version. Just BLOCKSMC1_4, no (base).
Doesn't look better ingame/console, but might on GitHub.
2016-01-25 21:49:06 +01:00
asofold
0a32d55039 Swap player name and check type for standard format. 2016-01-25 21:23:30 +01:00
asofold
d62ff6754a Move moving specific logging methods back to the moving listener.
* Make them private methods.
* Use standard log message prefix (add a method for that to CheckUtils).
2016-01-25 21:10:42 +01:00
asofold
f6dfa51efe Alter tags in blockinteract.visible. 2016-01-25 20:40:05 +01:00
asofold
544e1ad14e Switch debug messages to a standard format.
Use check-specific debug methods for convenience.
Add to: Check, CheckListener, BaseAdapter.
Relay to: CheckUtils.

Side effects:
* Remove constructor: CheckListener().
2016-01-25 20:35:43 +01:00
asofold
9118aa023a Enable hooks to test for presence of applicable log actions.
This is half a guess on base of a request. Hooks can now check if there
are any log actions, or cast IViolationInfo to ViolationData and query
if anything would be logged to a certain stream.

Alterations pending (allow query for multiple streams or just get
streams/configs, what to have in the official API in IViolationInfo).
2016-01-25 11:00:20 +01:00
asofold
6282a9afbe Add isOptimized() test to Action, GenericLogAction.
This allows testing if the there will be lookups of configuration values
for GenericLogAction instances.
2016-01-25 10:19:51 +01:00
asofold
822cb90410 Allow friction based horizontal distance in creativefly. 2016-01-19 00:20:00 +01:00
asofold
57378a1f11 Make one method for all the oddXYZ stuff. 2016-01-18 18:12:50 +01:00
asofold
2e216c4ada Exclude violation on clearly accepted envelopes early. 2016-01-18 16:17:34 +01:00
asofold
2fdd9911e8 Log untracked outgoing position. Simplify onPacketSending. 2016-01-18 10:52:19 +01:00