Skip to content

Commit

Permalink
Add Check.executeActions with IPenaltyList as extra argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
asofold committed Feb 14, 2016
1 parent 0915acd commit e958e6e
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/Check.java
Expand Up @@ -8,6 +8,7 @@

import fr.neatmonster.nocheatplus.NCPAPIProvider;
import fr.neatmonster.nocheatplus.actions.ActionList;
import fr.neatmonster.nocheatplus.actions.types.penalty.IPenaltyList;
import fr.neatmonster.nocheatplus.checks.access.ICheckConfig;
import fr.neatmonster.nocheatplus.checks.access.ICheckData;
import fr.neatmonster.nocheatplus.compat.MCAccess;
Expand Down Expand Up @@ -97,13 +98,34 @@ public Check(final CheckType type) {
* Execute actions, thread-safe.<br>
*
* @param player
* the player
* @param VL
* the vL
* The player who failed a check.
* @param vL
* The total check-specific violation level.
* @param addedVL
* The violation level, that has been added with this violation.
* @param actions
* The ActionList to use for this violation.
* @param penaltyList
* IPenaltyList instance to fill in penalties for specific input
* other than Player.
* @return The ViolationData instance that is created for execution of
* actions.
*/
public ViolationData executeActions(final Player player, final double vL, final double addedVL, final ActionList actions, final IPenaltyList penaltyList) {
return executeActions(new ViolationData(this, player, vL, addedVL, actions, penaltyList));
}

/**
* Execute actions, thread-safe.<br>
*
* @param player
* The player who failed a check.
* @param vL
* The total check-specific violation level.
* @param addedVL
* The violation level, that has been added with this violation.
* @param actions
* the actions
* @param isMainThread
* if the thread the main thread
* The ActionList to use for this violation.
* @return The ViolationData instance that is created for execution of
* actions.
*/
Expand Down

0 comments on commit e958e6e

Please sign in to comment.