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.
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.
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
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.
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.
* Add a new base class for better sub-command handling also for
tab-completion (AbstractCommand).
* Alter package structure slightly, to group command-classes by purpose.
* Some renaming.
Not sure this is that much final, but PlayerData can now carry tags.
NoCheatPlus.sendAdminNotify... will now check PlayerData for the
"notify_off" tag, as a preparation for a command to turn off
notifications.
Factories are now on NCPPlugin level, thus all the core stuff can be in
one module, giving better source code browsing.
Updates has been moved into an updates package, because there is to be
expected more content, and to make utilities less fat.
To indicate the direction, the basic infra-structure has been added to
allow adding components to the DefaultComponentFactory. Further
processQueuedSubComponents is now called after each components adding in
order to allow more flexible registry features.
* Static utility NCPAPIProvider instead of NoCheatPlus.getAPI().
* Extend NoCheatPlusAPI: Some previously static access methods are now
part of the NoCheatPlusAPI interface instead. MCAccessHolder is
implemented and allows external setting of MCAccess.
* Fix some static members/calls to non-static.
* Moving some packages to NCPCore.
* Prepares for moving most check stuff between NCPCompat and NCPPlugin
to allow more optional higher level components.
This allows setting a grace-period which allows that amount of seconds
longer sprinting even though the food level just dropped below minimum
for sprinting. This will hopefully reduce seldom false positives as well
as improve compatibility with other plugins like Heroes, which have
skills that add velocity and at the same time decrease the food level
below sprinting-limit (fp on landing).
This allows triggering the invalidation for the active horizontal
velocity at half of the allowed speed instead of full, in case of
setting the flag to false.
* This method is "hard-coded" and not configurable yet.
* Prevent throwing and teleporting into blocks directly, prevent
the second throw on glitching into a one thick ceiling (might lead to
lots of passable violations at present).
* If stuck in a block with the feet (not sand/gravel) without being on
ground, throwing is prevented.
* Some dependencies were updated, hopefully without conflicts for
backwards compatibility (untested).
Critical:
* Add tags.
* Add extra flag (redundant to MediumLiftOff, just indicating what the
real lift off was, might need redesign, since m-lo is modified
sometimes.)
registration.
* OnDemandTickListener contains API for convenient on-demand
registration and use.
* TickTask recognizes these and conveniently sets them
registered/unregistered.
* TickTask was optimized to allow faster adding and removal of
TickListener instances.
* Used for delayed component registration.
* Future purpose.
* Fixes data removal ignoring chat.logins and chat.text for a part.
* Move some components interfaces and ReflectionUtil to NCPCommons.
* Unregister components in reverse order.
* Add ComponentRegistryProvider for generic sub-registries (DataManager
for instance).
* Add IHoldSUbComponents for delayed sub-component registration
(convenient for iteration over parent-components with later registration
of sub components not missing out any registered parent components for
those). [Partly implemented: Using this during runtime does not yet
work, only used in onEnable.]
* Let CheckListener implement IHoldSubComponents and use this with
addCheck to register the queued checks after all the listeners.
* Register the core system components in a bunch before the
CheckListenerS, to allow sub-registries to work directly and to allow
getAPI().addComponent on the plugin class during construction of
CheckListeners.
Reminder: Policy is to increase second level count for Minecraft updates
and bigger internal/external changes, while the third level count will
indicate releases on BukkitDev rather. First level count probably will
only increase if something really fundamental is changed.
1. Set the correct effect strength in data.
2. Adjust workarounds to catch jump effect II on fences and similar.
[Might need more specialized checking for performance reasons.]
Check some preconditions in the check method, delegate to different
methods for different cases, also to have smaller method bodies.
IsAboveStairs is only checked for "mild" y-distances. For faster
descending an individual edge-check has been added.
General:
- Wrong flags checked or flags checked in the wrong way.
- isPassable should use collidesBlock.
- collidesBlock should not see high-value-only matches as collisions.
- collidesCenter returns true for the case of collision (...).
Liquid blocks:
- New flag introduced to model rough liquid height for flowing liquids.
- One more workaround condition for moving in/off liquids.
- Use exact bounding-box for liquids checking in PlayerLocation.
- Check for water first in PlayerLocation.isInLiquid.
Other:
- Alter some block flags and workarounds.
- (other)