mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-09 12:10:37 +01:00
851203edb9
This is a first step in, which doesn't change the default behavior, however it might break plugins that rely on certain internals. PenaltyAction allows to do something with probabilities to consider, including the possibility to select the first applicable penalty or applying several penalties. There will be player-specific penalties, which are applied during ViolationData.executeActions always, and there will be input-specific penalties, e.g. for applying within the event listener. Potentially breaking: * Return value of executeActions is now void for Action + ViolationData. * Return value of Check.executeActions is ViolationData now. * CancelAction is now extending PenaltyAction. * CancelPenalty may cancel, but might not, due to probability. * IViolationInfo.hasCancel -> deprecated, now returns willCancel(). * IViolationInfo.willCancel is now used, applicable penalties are estimated on creation of ViolationData. * Custom actions can no longer be used to cause cancel. Only penalties can do so now (due to the return type change). CancelAction is still there to keep a simple action for canceling. Not yet: * InputSpecificPenalty support for fight checks and using them in the default actions. * Configuration for penalties (currently only a plugin could override the action factories, later penalties may have a probability to apply, reference each other, allow first match, apply several at once). |
||
---|---|---|
.. | ||
src/main/java/fr/neatmonster/nocheatplus | ||
pom.xml |