Roughly this line of develpment has to do with:
* Prevent destroying ones own vehicle [INCOMPLETE: conflict with older
MC versions.].
* More careful set-back handling.
* Reset the players position to that of the vehicle if the player moves
too far off (likely does not have effect, needs more testing). In
principle this is intended to trigger a teleport, the normal player is
intended to not notice, but no guarantees yet.
Not configurable yet, might not work 100%, yet.
There seem to be cases with a repeated horizontal speed increase which
should be covered by the bunnyhop mechanisms. The first increase will
not go as high as possible but have 0 y-diff, while the second one will
trigger a violation with a higher y-diff and another increas in the
horizontal distance. This commit does not cover a general multi-step
speed-increase case, but just attempts to catch this special case.
The command lists for handleaschat and exclusions are now also fed with
a leading "/" if missing. Allows more convenient setup and less
confusion potential for relating comamnd lists in "protect plugins" to
other lists.
opinconsoleonly has been made a list of commands:
protection.commands.consoleonly.
Further the message sent to the player is the permission message,
if the player does not have permission to use the command,
provided NCP can find the command.
All three command lists are also checked with the original
command label.
Commands to change to "no permission" or "unknown command" behavior,
can now be configured with a string list each. Commands that have a
permission set will have the default set to false, while commands that
don't have a permission will be altered to have a filter permission,
namely nocheatplus.filter.command.<commandname>.
* Fix color replacing in command protection (had no effect previously).
* Use "no permission" message for default bukkit command protection.
* Use command protection only, no more parsing pre process for /pl etc.
* Other tweaks (update descriptions, add shortcuts / child permissions).
Changes are mostly backwards compatible.
Fixed:
* Filter permissions were wrong (not starting with nocheatplus).
Changed:
* Commands are grouped under nocheatplus.command now.
* Notification permission is independent of the notify command,
changed to nocheatplus.notify.
New:
* Shortcut permissions (nocheatplus.shortcut...) for safer use.
* Shortcut permission for testers: nocheatplus.tester
This change addresses the fact that the bunny hop thing also applies
when not sprinting, also without actually jumping. In future the buffer
will be much more confined to special cases and/or limited in how it
regains level (nu pogodi).
* Currently bunny applies very often on sprinting, thus it can be pre-
checked before permchecks, and if necessary re-checked after
permchecks.
* Remove heuristic permchecks, since the above should do better.
* Fix bunny not trigger for assumeonground && jumpphase == 0.
Further we will try to get rid of the horizontal buffer as we know it,
confining it to special cases. However we have to extend bunny hop to
apply without sprinting as well. Might need a more general concept
for ground-move-modifiers and friction to achieve it.
Setting to something on creation of data is ineffective, because it gets
set to 0 on passable violations.
Keeping the buffer means other abuse potential.
Probably better postpone until re-design/removal of the buffer concept.
Might consider for future:
The problems of the type lost-sprint, bunny seem to be client mechanics.
The ground-modifiers apply and stay valid during jump, thus turning off
sprint for attacking makes sense.
So i revert the statement about "could be worth a ticket" for the
moment. However with looking forward to have a Minecraft API, it could
could be appropriate to provide something to allow server-side checking,
yet again finding the right ground modifier needs knowledge of the
exact moves the client did, so client side could change to send all the
transition events as suggested before.
Horizontal speed after-failure checks:
* More conditions to confine use more (on-ground, web/fluid/etc.).
* Increase bunny counter during bunny-fly until touching the ground.
* Check bunny fly first and ignore sprinting for that one.
* Attempt to fix "double bunny", i.e. small blocks on blocks.
* Redo part of checking order, do permission checks first, otherwise
there might happen unwanted invalidation of velocity.
* Force permission check with the first getting of hDistance on
certain conditions, to prevent certain redundant call.
* Remove code duplication by checking buffer regain after all other.
The usual case is that regain is checked anyway.
* Don't use buffer for bunnyfly. Makes tags more unique.
* Horizontal buffer is not modeled such that it can't become negative.
* hvel tag added for using horizontal velocity.
* hspeed tag is only added on hspeed violations.
Altered model for bunny-hop problem. We reduce the sprinting-modificator
by a lot, and add extra buffer during the now introduced "bunny fly"
phase. Conditions have been refined.
Certainly needs more testing, also regarding effects.
The problems with attacking + sprint/bunny seems to be that the player
moves on as if sprinting, thus we reformulate it as the "lost sprint"
problem. The sprintback check is skipped during lostsprint phases.
This should be worth a ticket for Mojang/CB, sprint + jump + attack
somewhere around touch down time (+-) - server side sprinting turns off,
but the player moves on as if sprinting.
Since the sprinting time has been fixed, it should not be necessary to
consume buffers/velocity, because it will not trigger at all.
(Context: throwing ender pearls at entities.)
Potential false positives are survivalfly violations with vacc[...].
* Touch down near ground (lost-ground miss).
* Slow falling after login/teleports.
* Further split off rather seldom triggering code parts into methods.
* Accounting does not manipulate the accumulator anymore.
* Remove some unused parameters form signature(s).
* Method renaming.
* Comment cleanups.
(Expect more with time...)
SetupOrder allows to define a priority, so you can register
ActionFactoryFactory instances before any checks get them.
Default priorities are NCP core at -100, DataManager -80, rest at 0.
Allows to set a new ActionFactoryFactory without the ConfigManager.init
already trying to parse actions, thus implementing special actions
should be easier. Still three calls might be necessary to be on the
safe side:
1. ConfigManager.setActionFactoryFactory(new factory)
2. ConfigManaher.setAllActionFactories()
3. DataManager.clearConfigs()
Not entirely convinced if concurrency issues might arise with reload or
even on startup (chat).
Hint at per-velocity friction factor. Could be used to add short term
velocity that does not decrease. However it can't replace extra-buffer
due to special invalidation conditions.
Move the after-failure permission-, velocity- and
extra-buffer-checks into an extra method.
Move special checks like web/liquid to extra methods.
Alter checking order slightly.
Other cleanups (comments, declaration order, grouping).
Shuffle methods.
Finished? No.
This reduces false positives with throwing enderpearls at nearby
entities or for horizontal velocity.
Missing: Use up horizontal velocity if sprintback is triggered and
queued velocity is present.
Jump (+run) and throw an ender pearl at a nearby entity.
Survivalfly might trigger with limitjump, since the MediumLiftOff gets
reset on teleporting (would appreciate MC adding sequence numbers to
moving packets :p).
Set-back handling:
* Make the VehicleSetBack a class in the moving package.
* For set-backs use the debug flag from the time of checking.
Debugging:
* Alter debug output for moves slightly (differing locations).
* Add debug output for vehicle moves with players involved.
Note on 1.6:
* Not even PlayerMove is fired for pigs and horses, so no tracking.
This workaround allows the block transition from above a 1.5 high block
into the block, for the case both from and to have been inside of the
bounds of the block. This should fix the annoying bug with jumping
inside of an open fence gate, closing it while just above 1.0 height,
so that passable would alert for moving back from air into the block.
Passable/ray-tracing might disallow players moving out of blocks which
they are stuck in on some occasions.
In order to allow moving out of a block, ray tracing is repeated
with the first block ignored for some cases.
Like with pigs, players can ride other entities than would fire
VehicleMove events. To counter this NCP will detect for which entities
those events are fired and do the packet checks for those that don't.
The permission is set as child of all command permissions
(sub commands of the root command). This is done in post enable to not
have to add it 100 times to the plugin.yml. Hopefully permission plugins
handle this right, superperms (permissions.yml) does.