Commit Graph

349 Commits

Author SHA1 Message Date
asofold
45aad9c99d Remove vcliponly option for passable. 2014-08-17 21:58:52 +02:00
asofold
d0aea7feaa [BLEEDING] Refine passable-ray-tracing (block-edge treatment).
Previously the max. bounds hitting the block edge would not be
considered as colliding, this can now be controlled with a flag.

If the flag is set, you will collide at offsets of 1.0 for either
coordinate (not if the offset is < 1.0).
2014-08-05 20:18:13 +02:00
asofold
4c7f88ec5c Refine RayTracing.
* Better coverage of block-transitions: One step per axis, dT can be 0.
* Cover one step always, also if no distance is covered.

There might be more false positives, due to newly intoduced bugs, or due
to not all block-transitions being checked (a x + z transition will have
two variations to test extra to the ordinary diagonal path, but only one
is checked).
2014-08-05 18:55:15 +02:00
asofold
4e9e935b1e Extend tersting for Passable + move NCPCore tests to NCPPlugin.
Tests (partly re-) added and extended, classes moved, some methods
moved.

Some tests will fail if you don't use the next commit as well.
2014-08-05 18:49:35 +02:00
asofold
5245dcca9a Add op-notice to "ncp inspect". 2014-08-05 18:46:11 +02:00
asofold
29000fbdb7 Add tests for PassableRayTracing (+spaces).
To make this works we change LogUtil to allow logging to console, and
initialize BlockProperties with MCAccessBukkit and use a fake
BlockCache, that allows to set blocks with an access method, so that we
can test ray-tracing.

The testEmptyCorner test would fail with the current implementation.
2014-08-04 21:35:43 +02:00
asofold
eaa4154080 Spaces + comments. 2014-08-04 18:38:45 +02:00
asofold
e84027a919 Set wasInBed in postEnable to prevent kicking with plugin managers. 2014-08-01 22:09:14 +02:00
asofold
427a877b17 Add tab completion to "ncp top". 2014-08-01 19:59:48 +02:00
asofold
58f84028f3 Fix number of entries not being used. 2014-08-01 19:41:44 +02:00
asofold
1a73b65d4a Add Convenience method for tab-completion and correct indentation. 2014-08-01 19:33:56 +02:00
asofold
5f82584072 Use TickTask.getLag(..., true), within the primary thread.
This counts in if the current tick is taking longer than 50 ms.
2014-08-01 19:25:37 +02:00
asofold
78d51b3904 Let morepackets relax/smoothen on certain occasions.
Trying to prevent a burst propagate and cause a violation, it will be
smoothed onto following buckets, if they have less than max packets,
stopping after adding to the first non-empty one.

Uncertain effect on cheating, first tests seem to show no huge
difference.
2014-08-01 19:23:00 +02:00
asofold
eb8cba597f Indentation. 2014-07-31 10:06:04 +02:00
asofold
2f13529a29 Preserve order of check types in APIUtils. 2014-07-30 22:50:02 +02:00
asofold
07af2f687a Fix CheckType parsing for "ncp top". 2014-07-30 22:23:23 +02:00
asofold
6b71692a40 Sort by sumVL after n, for lower violation counts. 2014-07-29 22:56:35 +02:00
asofold
7d40df9d8c Rename the kicklist command to denylist. 2014-07-29 21:11:31 +02:00
asofold
c2722abc19 Add the "ncp top" command, allowing to search all the violation history.
Original pull request:
https://github.com/NoCheatPlus/NoCheatPlus/pull/24

This probably is not the final implementation, but it allows some
minimal freedom:
* Specify number of entries to show.
* Specify check types (and groups!).
* Specify what to sort by.

There might be need for some merged view, combining several different
check types somehow, or just shortcuts for specific selections, e.g. for
fighting-related checks.

----

+ Fix root command not showing sub commmand usage.
2014-07-29 13:49:43 +02:00
asofold
9b6c717fc0 Add ability to show a per-command usage + apply "correct indentation". 2014-07-29 11:55:53 +02:00
MyPictures
4ded8e4c2f Lets use space instead of tabulator here? 2014-07-28 08:37:55 +02:00
asofold
1a010b8f43 Update/reorder command usage/description. 2014-07-28 01:26:10 +02:00
asofold
8ad7009648 MorePackets: Make monitored seconds configurable, increase default to 6. 2014-07-28 00:44:44 +02: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
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
4176937dd1 Add a general purpose counter for stats/debug, and log+reset commands.
This may get changed around, e.g. to allow log output to file and other.
2014-07-27 20:22:53 +02:00
asofold
e0f81b43b6 Command+perms rename: tempkick to denylogin and unkick to allowlogin.
Aliases are still set for commands and permissions, so this should not
break things.
2014-07-27 17:25:35 +02:00
asofold
c99612154c Demand most action commands to be run from the console.
For players they either have no extra value over vanilla commands or
they have too high of an abuse potential.
2014-07-27 16:53:21 +02:00
asofold
7c967ab2e2 Add game mode to inspect command. 2014-07-27 16:26:57 +02:00
asofold
d55cd7e4b6 Add a generic instance factory to the API.
This allows storing useful objects in the registry.
2014-07-27 15:17:08 +02:00
asofold
67ac214909 Rename Stats to Timings and move to stats package. 2014-07-27 12:13:03 +02:00
asofold
0496f281b7 Add isTrueForAnyConfig, e.g. to check if to register listeners at all. 2014-07-26 22:28:53 +02:00
asofold
126c400813 Ensure copy-on-write is used for worldsMap. 2014-07-26 22:20:48 +02:00
asofold
564ce88132 Fix burstEPM violation + add tags for MorePackets + more lenient burst. 2014-07-26 21:42:56 +02:00
asofold
901b2a45a2 Account for server-side lag with burst packets.
Only count as burst, if there was enough lag. Might need adaption to
count lag again for judging the EPM, due to differing window resolution.
2014-07-26 20:49:46 +02:00
MyPictures
584a3d9ab0 Design improvements on Permissions.java
- admin.debug is now in the plugin.yml
- all permissions are now in alphabetic order
- aligned every permissions group
- Added additonal comments
2014-07-26 04:19:51 +02:00
MyPictures
d5c7bb7d27 Merge pull request #2 from NoCheatPlus/master
Downstream merge
2014-07-26 04:04:32 +02:00
MyPictures
ce339c62bd Permissions.java cleanup
- Replaces all tabulators with spacebars
- Splits Commands to Commands and Auxiliary Commands
- Commands and Auxiliary Commands are ordered alphabetically now
2014-07-26 03:54:44 +02:00
asofold
9f03a3ea06 Add direct burst violations and increase epm limit. 2014-07-26 01:06:58 +02:00
asofold
4eefc0c3ff Check speeding permission in the end, thus it will apply to all speeds.
This way, using the speeding permission as a workaround for all
individual speeds is possible. A player moving faster than default will
likely move faster in web too, and so on. There seems to be little
reason for keeping it confined to walking + sprinting only.

Moving it to the end also allows a quicker return for walking and
sprinting, though that policy might be questionable as well, because
some calculations might use hAllowedDistance, subject to review.
2014-07-25 18:51:18 +02:00
asofold
2257ac2f71 Add exception for MILK_BUCKET. 2014-07-25 15:22:01 +02:00
asofold
552beed739 Add limiting of "bursts" in moving.morepackets. 2014-07-23 23:31:31 +02:00
asofold
039c4b407f Add configuration to morepackets for "eps", i.e. events per second. 2014-07-21 14:39:17 +02:00
asofold
d5c1e289a9 Count "just look" moves same way.
As CB reduces the number of events, this should be fine. The cause of
trouble that lead to skipping these had been elsewhere.
2014-07-21 14:24:06 +02:00
asofold
7de214abae Only check for lag if there is windows to burn. 2014-07-21 14:22:45 +02:00
asofold
1441859ced Move the new packet frequency check to a static utility, minor cleanups.
* Always use lag.
* Let the morepackets check decide how to treat "just look" events.
* Optimizations.
* Renames.
2014-07-18 15:54:46 +02:00
asofold
3d5bbbbedd Server-side lag adaption: more strict if there is no lag. 2014-07-18 03:04:32 +02:00
asofold
58a7c15966 Check violation vs. the less strict limit. 2014-07-18 02:33:13 +02:00
asofold
4ee4e6f08d Don't count empty ones. 2014-07-18 02:25:38 +02:00
asofold
27d35c1208 Not just block changes. 2014-07-18 02:15:49 +02:00