The old ListenerManager is removed, new system in place. Removed
doesManageListeners(). (The new system isn't that new, but it's been
fixed and adapted to using RegistrationOrder.)
New
* Register all Bukkit events via the new EventRegistryBukkit.
* This way listeners can be ordered by numeric priority and tags
(regular expressions for beforeTag and afterTag).
* Unregistering listeners is possible (a listener node stays in the
Bukkit registry, but only one per event).
* It's possible to add listeners with minimal impact (MiniListener).
* The registry registers by event class 'hard' i.e., no relations
between already registered classes are checked.
* Order isn't necessarily stable nor even reproducible for randomized
start conditions with the same elements.
Point
* Compatibility hooks can easily place event listeners
before/after/between NCP default listeners, without resorting to tricks
like 'load-before'.
* Future registry of NCP itself: unregistering listeners is necessary
for runtime-removable checks, order is useful if not necessary, to be
able to add check listeners at any point of time.
Breaks:
* Anything relying on the previous (optional) managelisteners feature.
Missing:
* Lots of testing/inspection.
* Ensure all NCP listeners are coming with name/tag at least.
* Provide meaningful tags/RegistrationOrder for fine grained access
(e.g. after feature.moving but before feature.inventory).
* Change cncp to hard depend on NCP and use listener priorities.
* The annotations made for RegistrationOrder are defined in there.
* Add RegisterMethodWithOrder (method) for event handlers.
* Add RegisterEventsWithOrder (type) for default order with listeners.
Yes
* Remove the UNKNOWN type.
* All types except ALL have a parent now.
* All types have a type now.
* APIUtils: Add getDirectChildren for distinction.
No
* APIUtils doesn't collect the descendants in a generic way yet.
(+) Note: If it's fired asynchronously, meta data isn't checked, due to
that not being thread-safe. In future extra checks for (demanded to be)
thread-safe external plugin APIs can be added (reflection only).
(+) Add comments to PlayerData, concerning future treatment of name-uuid
mappings and retaining data.
Only applying with GROUND_HEIGHT set, these flags allow setting a
minimum height for passability and ground workarounds, covering two
typical cases.
Due to a range of hard coded workarounds being in place already, these
flags won't apply for all blocks. See getGroundMinHeight.
* Start renaming methods internally (getType for getting Material) -
unfinished.
* Temporary fix for the NCPCompatbukkit/cbreflect module: fetch NMS
blocks by id until we have a mapping and/or something efficient and
future proof in place.
Placing boats on ground is possible at least down to CraftBukkit
1.4.5-R1.0, thus the reason for having the boatsanywhere feature solely
is to prevent abuse. Thus allowing to place boats on ground does not
really provide a 'fix'. In order to allow placing boats anywhere, the
configuration flag has to be altered.
It may be worth a discussion, if we want checks to prevent Minecraft
features at all. A proper fix for abuse would be more complicated,
involving checking the estimated bounding box of the placed boat not to
collide with blocks neither with entities while being on ground-.
Determining the bounding box and re-checking with entity spawn might be
the more complicated part, as for the rest API/Infrastructure exists.
Allowing it with protocol support plugins is added, assuming that
they'll allow 1.12 too.
Missing:
* The vehicle.envelope check must be made (more) precise, as moving on
ground is possible with a boat since 1.12, specifically on ice they can
reach high speeds. Without more close modeling, they'll be able to use
this for speeding.
* Allow specifying to remove color definitions (both Minecraft default
and with '&') and to replace color definitions that use '&'. Append
?color or ?nocolor after the level definition. (Shortcuts: c, col / nc,
noc, nocol, nocolor). Either of both can be set, not both.
* Log to multiple streams with individual levels and color flags by
separating stream definitions with '+'.
Any registered stream id can be used (default streams are defined in
fr.neatmonster.nocheatplus.logging.Streams, in theory other plugins
might register their own ones).
Shortcuts are:
* ncp log stream notify message... (ingame notification, info level)
* ncp log stream debug message... (trace file, fine level)
* ncp log stream status message... (file + console, info level)
* ncp log stream init message... (file + console, info level)
Shortcuts do support setting the level, e.g. status@severe.
Due to string parsing these are not as efficient as hooking into the API
would be, naturally.
To model differing behavior of fluids, i.e. half fall distance per
in-lava move vs. zero fall distance once in water, block flags will be
used. To really do this the NoFall check will be altered to account for
new flags. Once at it, the check should also treat from and to
independently of each other - there are some inconsistencies, such as
how oFallMaxY is set.
Further flags are reserved for MIN_HEIGHT..., indicating that
compatibility will be improved without compromising protection too much.
Thus instead of making a block entirely passable, you could set a
specific min height flag alongside ground_height (and possibly height
for max. height), in order to allow walking between level x and y but
not below (think of grass_path).
* Lift-off side conditions.
* Force stop gliding for some side conditions, to avoid freezing.
* Set maxheight to 128 for elytra and levitation too (mods/plugins/etc)
- better refine checks to catch stuff.
* Fix special flags not getting set with initializing ModelFlying from
config.
* Debug log exceeding the maxheight setting.
* Mostly harmless: Add interfaces and access methods, including
convenience methods.
* Don't store methods in Bridge1_9.
Issues left, not limited to:
* Boost not recognized on occasion.
* Gliding state kept when submerged in water and moving normally like
when not gliding, e.g. ascending (head in water / fully submerged).
* Elytra lift off not accepted: Gliding state set near the water
surface, but survivalfly check runs. Might be fixed already, though.
Breaks what used ModelFlying in any other way than setting up by config.
Use setters with chaining and a lock() method to lock against changes,
provide copy-constructor.
This is incomplete, as some pre-checks are still done with the full
bounds (flying just under web will put you to sf). Efficiency-wise there
could also be a more light-weight adjustment.
Attack areas are left too, e.g. flying (with or without boost) to
underwater, then end gliding to effectively clip with the head into
/through the block above.
With the lowered height it's also possible to get into odd spots, so
after stopping to glide you'll not be able to get out anymore.
This will not check all possibilities, if default=YXZ fails:
* X or Z collision: test YZX as alternative.
* Y collision: test XZY then ZXY as alternatives.
Would need to check client code, possible of multiple client versions,
considering widespread use of protocol support plugins.
New
* Define a couple of default lists for axis order.
* Allow setting axis order via a list.
Removed
* Configuration option to disable ray-tracing.
* Configuration option 'blockchangeonly' - there may be an equivalent
later on, where checking accounts for the entire bounding box(es).
* Legacy code option (things have stabilized and axis order switching
should fix false positives).
Random
* Accidentally commit FastConsume (whitespace).
Currently typically blockbreak.direction will fail, if blockinteract
used a (the first) flying packet.
Other oddities: Block damage followed a cancelled interact event.
* Issues remain with "moved too quickly" interfering (TP loop with
waterfall/alternating, possible to escape).
* Not sure the previous modeling makes sense at all with allowing
friction now.
This probably is too much of a special case (place without interact?),
might rather hit plugin features. Apart from that, consequently, other
checks should test for this too?
[BLEEDING] just to note blockinteract changes may alter things.
Currently it looks like only blockplace.against is using the last move
of BlockInteractData - later other checks are intended to use that too,
in terms of a data source.
* Store complete event result state for interact.
* Store consumed checks as well.
* Still run the speed check, if only using the item in hand is allowed.