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.
Refactored penalty time handling to use a PenaltyTime object, taking
into account time running backwards, also unify attack (close combat)
penalties to a generic attack penalty. Combined.yawrate still keeps the
timeFreeze penalty, due to also cancelling other actions than melee,
still changed to a PenaltyTime object.
Changing the item in hand now leads to an attack penalty (that also goes
for not changing the item, but changing the slot).
"Quick" addition, not much testing, except few unit tests.
Note that this could change false detection behavior of other sub-checks
of fight, because the penalty time is checked last. Previously checks
like direction or reach would have cancelled already if the player was
within their penalty time. Hard to say if this creates new false
positives, but it will be more strict on continuous violations.
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.
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.
* 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.
We can put through build parameters for testing and other purposes so
NCP can see them during testing or runtime otherwise. Not sure this is
the final version, though.
Moving big parts of code between sub-projects. Some refactoring was
needed to unlink some classes. Deprecated methods removed. Some utility
methods were moved to differently named utilities. Few signatures
changed (e.g. BlockProperties.init). Most changes should only concern
bugs or developers who dug into some NCP deeply (not sure those exist).
It should still all be there.