Commit Graph

368 Commits

Author SHA1 Message Date
asofold
6c0e1bb6c8 If neither from nor loc is passable, set back to from (earliest) rather. 2014-10-29 23:28:17 +01:00
asofold
f29acd3f00 Only demand the word "slime" to match for slime blocks.
This might help with compatibility, since we don't know how different
continuations of Bukkit will name things.
2014-10-29 12:09:58 +01:00
asofold
31a414942c Copy and paste fial. 2014-10-29 01:52:20 +01:00
asofold
b57d7745e4 [BLEEDING] Refine logging on logout. Actually set-back on logout.
* Always log location of logout if debug is set.
* Also check inconsistent logout if manahattan distance is > 0.
* Only perform "passable check" only if enabled and not dead/sleeping.
* Try to actually set-back.
2014-10-29 01:49:18 +01:00
asofold
e12c2a2bfc Fix manhattan methods using doubles, add signature for LocationS. 2014-10-29 00:52:05 +01:00
asofold
9827570e2d Log a warning if a player logs out having moved into a block unnoticed. 2014-10-28 23:09:36 +01:00
asofold
5ec3cd5963 Move set-back handling into dataOnJoin for respawn + join events. 2014-10-28 22:33:43 +01:00
asofold
87bc5edca0 It's yes or no, not true or false. 2014-10-26 20:38:02 +01:00
asofold
7b2a680ead [BLIND] Add dedicated compatibility module for Glowstone.
This is extending the classes for Bukkit (API only), and only overriding
very few methods, such as getCommandMap, dealFallDamage.
2014-10-26 20:25:00 +01:00
asofold
43dea0830a [BLIND] Add blocks for MC 1.8. 2014-10-26 16:40:57 +01:00
asofold
f965ea0610 Minimal formatting changes. 2014-10-10 17:08:35 +02:00
asofold
af974a85ac [SAFETY COMMIT] Freeze changes to vertical velocity.
Since other fixes migth be in focus, some changes are commited
merged/commented out:
* Prepare AxisVelocity to carry positive and negative values.
* Prepare MovingData to use vertical AxisVelocity. Rename hVel.
* Prepare CreativeFly (...), do not count velocity for height limit.

(Most preparations were unfinished, just hinting at the direction.)
2014-10-10 15:28:51 +02:00
asofold
3ea098876f Update block break timing for obsidian. 2014-10-05 08:48:55 +02:00
asofold
b4669e2a53 Catch a null case. 2014-09-05 01:21:45 +02:00
asofold
e861b97538 Spaces. 2014-08-23 23:12:41 +02:00
asofold
32a11f021a Refactor horizontal velocity to use an abstract AxisVelocity class.
AxisVelocity will later represent per-axis velocity accounting for both
directions along an axis.

There have been no changes to the functionality, so it still only
accounts for positive values.
2014-08-23 23:11:21 +02:00
asofold
53c0d9584c Config change: blockchangeonly is false by default (changed earlier). 2014-08-17 22:51:22 +02:00
asofold
589dc77510 Change quick-exit check for passable.
* Include the case for manhattan == 1.
* Use BlockProperties.isPassable.
2014-08-17 22:46:55 +02:00
asofold
7c1b2eaed3 Commant + indentation. 2014-08-17 22:03:26 +02:00
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