Change packages for penalties.
So actions.types remains soemwhat consistent for now.
This commit is contained in:
parent
f6d00c3346
commit
ad5be20eb6
|
@ -18,11 +18,11 @@ import java.util.Map;
|
|||
|
||||
import fr.neatmonster.nocheatplus.actions.types.CancelAction;
|
||||
import fr.neatmonster.nocheatplus.actions.types.LogAction;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.CancelPenalty;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.PenaltyAction;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.PenaltyNode;
|
||||
import fr.neatmonster.nocheatplus.actions.types.PenaltyAction;
|
||||
import fr.neatmonster.nocheatplus.checks.ViolationData;
|
||||
import fr.neatmonster.nocheatplus.logging.StaticLog;
|
||||
import fr.neatmonster.nocheatplus.penalties.CancelPenalty;
|
||||
import fr.neatmonster.nocheatplus.penalties.PenaltyNode;
|
||||
import fr.neatmonster.nocheatplus.utilities.CheckUtils;
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,9 +16,8 @@ package fr.neatmonster.nocheatplus.actions.types;
|
|||
|
||||
import fr.neatmonster.nocheatplus.actions.AbstractActionList;
|
||||
import fr.neatmonster.nocheatplus.actions.ActionData;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.CancelPenalty;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.PenaltyAction;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.PenaltyNode;
|
||||
import fr.neatmonster.nocheatplus.penalties.CancelPenalty;
|
||||
import fr.neatmonster.nocheatplus.penalties.PenaltyNode;
|
||||
|
||||
/**
|
||||
* Sole purpose is to indicate that an action is to be cancelled 100% (as
|
||||
|
|
|
@ -12,11 +12,13 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty;
|
||||
package fr.neatmonster.nocheatplus.actions.types;
|
||||
|
||||
import fr.neatmonster.nocheatplus.actions.AbstractActionList;
|
||||
import fr.neatmonster.nocheatplus.actions.Action;
|
||||
import fr.neatmonster.nocheatplus.actions.ActionData;
|
||||
import fr.neatmonster.nocheatplus.penalties.IPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.penalties.PenaltyNode;
|
||||
|
||||
/**
|
||||
* Penalty action, referencing a certain penalty defined elsewhere. <br>
|
|
@ -22,11 +22,11 @@ import org.bukkit.entity.Player;
|
|||
|
||||
import fr.neatmonster.nocheatplus.NCPAPIProvider;
|
||||
import fr.neatmonster.nocheatplus.actions.ActionList;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.IPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.compat.MCAccess;
|
||||
import fr.neatmonster.nocheatplus.components.debug.IDebugPlayer;
|
||||
import fr.neatmonster.nocheatplus.components.registry.event.IGenericInstanceHandle;
|
||||
import fr.neatmonster.nocheatplus.hooks.NCPHookManager;
|
||||
import fr.neatmonster.nocheatplus.penalties.IPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.players.DataManager;
|
||||
import fr.neatmonster.nocheatplus.players.ExecutionHistory;
|
||||
import fr.neatmonster.nocheatplus.players.IPlayerData;
|
||||
|
|
|
@ -24,13 +24,13 @@ import fr.neatmonster.nocheatplus.actions.ActionData;
|
|||
import fr.neatmonster.nocheatplus.actions.ActionList;
|
||||
import fr.neatmonster.nocheatplus.actions.ParameterName;
|
||||
import fr.neatmonster.nocheatplus.actions.types.GenericLogAction;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.DefaultPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.IPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.PenaltyAction;
|
||||
import fr.neatmonster.nocheatplus.actions.types.PenaltyAction;
|
||||
import fr.neatmonster.nocheatplus.checks.access.IViolationInfo;
|
||||
import fr.neatmonster.nocheatplus.compat.BridgeHealth;
|
||||
import fr.neatmonster.nocheatplus.logging.StaticLog;
|
||||
import fr.neatmonster.nocheatplus.logging.StreamID;
|
||||
import fr.neatmonster.nocheatplus.penalties.DefaultPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.penalties.IPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.permissions.RegisteredPermission;
|
||||
|
||||
/**
|
||||
|
@ -193,6 +193,10 @@ public class ViolationData implements IViolationInfo, ActionData {
|
|||
if (!penaltyList.isEmpty()) {
|
||||
penaltyList.applyAllApplicablePenalties(player, true);
|
||||
}
|
||||
/*
|
||||
* TODO: Concept for penalties running actions. E.g.
|
||||
* penaltyList.applyAllApplicablePenalties(ViolationData, true);
|
||||
*/
|
||||
} catch (final Exception e) {
|
||||
StaticLog.logSevere(e);
|
||||
// On exceptions cancel events.
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.bukkit.potion.PotionEffectType;
|
|||
|
||||
import fr.neatmonster.nocheatplus.NCPAPIProvider;
|
||||
import fr.neatmonster.nocheatplus.actions.ParameterName;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.IPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.checks.Check;
|
||||
import fr.neatmonster.nocheatplus.checks.CheckType;
|
||||
import fr.neatmonster.nocheatplus.checks.ViolationData;
|
||||
|
@ -33,6 +32,7 @@ import fr.neatmonster.nocheatplus.checks.moving.model.LiftOffEnvelope;
|
|||
import fr.neatmonster.nocheatplus.checks.moving.model.PlayerMoveInfo;
|
||||
import fr.neatmonster.nocheatplus.checks.moving.util.AuxMoving;
|
||||
import fr.neatmonster.nocheatplus.checks.moving.util.MovingUtil;
|
||||
import fr.neatmonster.nocheatplus.penalties.IPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.players.IPlayerData;
|
||||
import fr.neatmonster.nocheatplus.utilities.StringUtil;
|
||||
import fr.neatmonster.nocheatplus.utilities.map.BlockProperties;
|
||||
|
|
|
@ -34,8 +34,6 @@ import org.bukkit.event.player.PlayerItemHeldEvent;
|
|||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import fr.neatmonster.nocheatplus.NCPAPIProvider;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.DefaultPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.IPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.checks.CheckListener;
|
||||
import fr.neatmonster.nocheatplus.checks.CheckType;
|
||||
import fr.neatmonster.nocheatplus.checks.combined.Combined;
|
||||
|
@ -62,6 +60,8 @@ import fr.neatmonster.nocheatplus.components.data.IData;
|
|||
import fr.neatmonster.nocheatplus.components.registry.event.IGenericInstanceHandle;
|
||||
import fr.neatmonster.nocheatplus.components.registry.factory.IFactoryOne;
|
||||
import fr.neatmonster.nocheatplus.components.registry.feature.JoinLeaveListener;
|
||||
import fr.neatmonster.nocheatplus.penalties.DefaultPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.penalties.IPenaltyList;
|
||||
import fr.neatmonster.nocheatplus.permissions.Permissions;
|
||||
import fr.neatmonster.nocheatplus.players.DataManager;
|
||||
import fr.neatmonster.nocheatplus.players.IPlayerData;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty;
|
||||
package fr.neatmonster.nocheatplus.penalties;
|
||||
|
||||
/**
|
||||
* Convenience implementation for input-specific effects (other than Player).
|
|
@ -12,7 +12,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty;
|
||||
package fr.neatmonster.nocheatplus.penalties;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty;
|
||||
package fr.neatmonster.nocheatplus.penalties;
|
||||
|
||||
/**
|
||||
* This penalty does nothing. It's presence solely indicates that an action is
|
|
@ -12,7 +12,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty;
|
||||
package fr.neatmonster.nocheatplus.penalties;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
|
@ -12,7 +12,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty;
|
||||
package fr.neatmonster.nocheatplus.penalties;
|
||||
|
||||
public interface IPenaltyFactory {
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty;
|
||||
package fr.neatmonster.nocheatplus.penalties;
|
||||
|
||||
import org.bukkit.configuration.MemorySection;
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty;
|
||||
package fr.neatmonster.nocheatplus.penalties;
|
||||
|
||||
/**
|
||||
* Contain applicable penalty types that need to be handled outside of
|
|
@ -12,7 +12,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty;
|
||||
package fr.neatmonster.nocheatplus.penalties;
|
||||
|
||||
/**
|
||||
* A reference to a penalty by id. Concept-wise this is meant for an early
|
|
@ -12,7 +12,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty;
|
||||
package fr.neatmonster.nocheatplus.penalties;
|
||||
|
||||
/**
|
||||
* Penalty for one type of input.
|
|
@ -12,7 +12,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty;
|
||||
package fr.neatmonster.nocheatplus.penalties;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Random;
|
|
@ -12,11 +12,11 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty.fight;
|
||||
package fr.neatmonster.nocheatplus.penalties.fight;
|
||||
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.AbstractPenalty;
|
||||
import fr.neatmonster.nocheatplus.penalties.AbstractPenalty;
|
||||
|
||||
/**
|
||||
* Basic fight specific penalty.
|
|
@ -12,11 +12,11 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty.fight;
|
||||
package fr.neatmonster.nocheatplus.penalties.fight;
|
||||
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.AbstractPenalty;
|
||||
import fr.neatmonster.nocheatplus.penalties.AbstractPenalty;
|
||||
|
||||
/**
|
||||
* Specifically target damage done by entities to entities.
|
|
@ -12,7 +12,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.actions.types.penalty.fight;
|
||||
package fr.neatmonster.nocheatplus.penalties.fight;
|
||||
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
|
|
@ -22,12 +22,12 @@ import fr.neatmonster.nocheatplus.NCPAPIProvider;
|
|||
import fr.neatmonster.nocheatplus.PluginTests;
|
||||
import fr.neatmonster.nocheatplus.actions.Action;
|
||||
import fr.neatmonster.nocheatplus.actions.ActionList;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.PenaltyAction;
|
||||
import fr.neatmonster.nocheatplus.actions.types.penalty.PenaltyNode;
|
||||
import fr.neatmonster.nocheatplus.actions.types.PenaltyAction;
|
||||
import fr.neatmonster.nocheatplus.checks.ViolationData;
|
||||
import fr.neatmonster.nocheatplus.config.ConfPaths;
|
||||
import fr.neatmonster.nocheatplus.config.ConfigFile;
|
||||
import fr.neatmonster.nocheatplus.config.DefaultConfig;
|
||||
import fr.neatmonster.nocheatplus.penalties.PenaltyNode;
|
||||
import fr.neatmonster.nocheatplus.permissions.PermissionRegistry;
|
||||
|
||||
public class TestActions {
|
||||
|
|
Loading…
Reference in New Issue