Commit Graph

245 Commits

Author SHA1 Message Date
asofold
53f027c3a3 [BLEEDING] Something quick against "magnet".
"Magnet" refers to a player seemingly freezing other nearby players onto
the spot, causing them to yaw-glitch, seemingly getting attracted by the
cheater.

Thanks again @Iceee for reporting and @Amaranth for finding cause +
suggested fix.

Not sure this both helps and prevents false positives, so it could get
redone a couple of times, might also result in being impossible to fix
with a plugin in an acceptable way.
2014-04-20 16:04:07 +02:00
asofold
b8fd9da08f Partly stitch up command protection.
- Never skip undoing changes. This is necessary to also process commands
that are not registered or that are fall-back aliases.
- Check adding all plugin commands always.
- Check for aliases as well for decision if to match a command.
2014-04-15 22:31:53 +02:00
asofold
547dfc890b Harden the command-pre-process handling against fall-back aliases.
These seem not to have been affected beforehand, due to the nature of
the SimpleCommandMap, however we don't want to exclusively rely on
fetching that one successfully.
2014-04-15 20:31:37 +02:00
asofold
e017ebf54a Increase VL change for blockplace.fastplace by a factor of 1000.
There had been a divisor of 1000, not sure why exactly.
2014-04-15 20:13:03 +02:00
asofold
1f0aafb63e Add a fail for null-worlds on updating set-back locations internally.
Setting a set-back location with a null World will now lead to a
NullPointerException. Setting null worlds on set-back locations is not
intended by contract, however due to using temporary Location instances
with Entity.getLocation(Location) and setting the world to null
afterwards to prevent memory leaks, also considering the number of
places where setSetBack is used, this seems to be an appropriate measure
to track better or help excluding violations of that contract.
2014-04-12 20:31:03 +02:00
asofold
af5e38b0a8 No extra NCP prefixes on commands. 2014-04-05 00:33:28 +02:00
asofold
e103acea4a ParameterName.UUID: Allow [uuid] in the strings configuration. 2014-04-01 23:13:29 +02:00
asofold
b6034162ee Add guard for not having checked at all. 2014-03-25 10:48:08 +01:00
asofold
c9b2ae1a3d Ignore players in vehicles with the fall damage events. 2014-03-24 22:03:01 +01:00
asofold
ea682417bc [RAW] First version for direction + reach using a moving trace.
This does not change the used methods much, thus it will rather allow
much more cheating, however it allows some basic testing for false
positives. The reach implementation has been slightly optimized to run
faster. The current implementation is not final and only uses trace
elements that were added in the current tick, the latest is always
included.

Next steps will probably be:
* Stricter methods for an individual TraceEntry (demand near-exact hit).
* Don't allow random latency shifting. Maintain a window-thing.
* Probably get rid of the classic method for attacking other entities.
2014-03-24 21:05:20 +01:00
asofold
f0f4a7ec2c Add test for first element for a maxAge iterator. 2014-03-23 19:05:15 +01:00
asofold
a4aad90c82 Fight checks: Use data and config from arguments. Prepare new methods. 2014-03-23 18:49:30 +01:00
asofold
4dc6b58920 Prepare fight checks for using a moving trace.
* Get+update players moving traces, create fake ones for other entities.
* Reorder checks + add some comments (not in use yet).
2014-03-22 19:19:23 +01:00
asofold
79b0feb28e Add more tests for LocationTrace. 2014-03-22 09:54:41 +01:00
asofold
75da549f25 Use the preset TAG for some commands. 2014-03-21 22:17:37 +01:00
asofold
6767bd7eec Ensure no fall distance remains for leaving players who could fly. 2014-03-21 20:42:32 +01:00
asofold
c27c03cf8e [BLEEDING] Maintain location traces (not making use of those, yet).
No change for the function of the plugin, except if there are new bugs.
Actual changes:
* Keep track of squared distance to the previous element in a trace.
* Balance mergeDist: prevent merging the latest entry, if the squared
	distance from the latest to the second latest element is greater
	than mergeDist. Never merge if there are only two entries in total.
* Add convenience methods for resetting and updating the trace.
* Maintain the moving traces actively. With intended use being
	player-player interaction, we will not reset with every teleport.
2014-03-21 20:29:09 +01:00
asofold
520e7bab74 Set fall distance to 0, if the player could fly or is in creative mode. 2014-03-21 10:11:47 +01:00
asofold
f1342fd021 First rough version of a LocationTrace implementation.
Just the raw implementation + initial test cases. To keep memory use
constant, a ring-buffer with some maximal size will be used. The
iterators are meant for faster implementation, rather than fastest
iteration. Later some trigonometric functions could be added to
LocationTrace, depending on if that may gain a lot of performance.

Next we will add the logics for adding entries and resetting the trace
to NCP (moving, teleporting, joining), on Logout the trace must not stay
in MovingData but should be garbage collected. That should be a
milestone dev build, though it does nothing for the user, it might help
finding crash bugs :p.

Soon to follow will be changing some fight checks to be able to use the
moving trace, then alter them to actually use it. Fight and interact
checks could also do moving consistency checking (tp exploit).

Who reads this?
2014-03-20 23:29:57 +01:00
asofold
2478ae787b Just a typo. 2014-03-18 23:34:45 +01:00
asofold
f8d72eb591 Make message for consoleonly feature configurable. [TICKET DBO 711] 2014-03-15 16:05:49 +01:00
asofold
d130a3d583 Random formatting change. 2014-03-15 15:48:20 +01:00
asofold
b9bcce1292 Fix for stained glass panes.
Adding a flag for ~ thin fence.
2014-03-03 23:13:05 +01:00
asofold
ce2d0dbc3c Add configurability to enforcing the players location. 2014-03-03 22:52:46 +01:00
asofold
2b2ace4a4b Set assumesprint to true by default (accidentally committed earlier!).
This will allow saving hunger, but there will be much less false
positives with current server versions.
2014-03-01 15:57:13 +01:00
asofold
9c29d32a98 Reviewing several places for use of Double.MAX_VALUE and similar.
(No game-changing stuff.)
2014-03-01 15:53:51 +01:00
asofold
ce5a90201c Ensure wrongBlock does not add Integer.MAX_VALUE as violation level.
Also cap violation at 4.
2014-03-01 15:15:10 +01:00
asofold
894aa466d6 Force return air for y outside of map bounds. 2014-02-25 11:43:44 +01:00
asofold
cb557122b8 Set maxBlockY from given world. 2014-02-25 11:22:39 +01:00
asofold
1cb9a18174 Rather use prepareSetBack than setTeleported before set-back. 2014-02-24 13:08:18 +01:00
asofold
8eebda863f Ensure TeleportCause.PLUGIN is used for teleporting. 2014-02-24 12:57:31 +01:00
asofold
65b3c4440d [BLEEDING/INSTABLE] Add actual move location consistency checking. 2014-02-23 03:30:27 +01:00
asofold
abdeb12377 Less object creation with short-use Locations + other preparation.
* Make use of Entity.getLocation(Location) in most places, for starters.
* Prepare a check for moving location consistency.
2014-02-23 02:01:28 +01:00
asofold
187a7ef094 Need to use isOnGroundOrResetCond here. 2014-02-22 22:43:20 +01:00
asofold
c08366b59b Merge pull request #23 from MyPictures/master
Remove "ASCII art" from the source code (finally?).
2014-02-22 22:20:46 +01:00
asofold
f1d7aa8a35 Clean up moving-data resetting on players joining the server. 2014-02-22 22:04:31 +01:00
MyPictures
add2179dc9 Cleanup "ASCII art" from the sourcecode
Wiped every ASCII related thing that I could find in the NoCheatPlus
source.
2014-02-22 19:26:06 +01:00
asofold
06aff0b0a6 [CONFIG] Reduce logging of blockinteract.visible by a lot. 2014-02-22 18:35:21 +01:00
asofold
1284fffdf1 Move some code off SurvivalFly.check. 2014-02-22 13:24:22 +01:00
asofold
888c18a908 Further confine pre-conditions for the sprintback check. 2014-02-22 13:03:00 +01:00
asofold
05372fbef4 Add comment. 2014-02-22 13:02:24 +01:00
asofold
d24a13ed12 Process captcha for cancelled chat events as well. 2014-02-22 00:00:10 +01:00
asofold
34c26c8791 ERR 2014-02-17 02:07:51 +01:00
asofold
9528b15f55 Avoid sign duplication due to a bug in CraftBukkit.
The cancelled BlockPlaceEvent will lead to an extra sign being dropped,
while the item in hand stays. Odd enough, the cactus is removed before
the BlockPlaceEvent - need to check if a ticket exists for CraftBukkit
already...
2014-02-17 01:58:44 +01:00
asofold
3361280cc7 Correct type of placed block, autosign uses Material.SIGN now. 2014-02-16 22:54:16 +01:00
asofold
598896a7cc Forgot to alter VL. 2014-02-16 22:31:09 +01:00
asofold
4ddfcc9063 Set dependencies to current snapshots. 2014-02-16 21:49:33 +01:00
asofold
8b298337ae Add a "Against" check, complementing the already exisiting CheckType.
* Promote BLOCKPLACE_AGAINST to "full check", with silent cancelling.
* Refactor listener for check arguments and order.
2014-02-16 21:29:52 +01:00
asofold
a198133cfa Use manhattan method for WrongBlock (not a change for the logic). 2014-02-16 19:26:45 +01:00
asofold
3f78497fde Add manhattan method for having one block. 2014-02-16 19:25:12 +01:00