From d4e171b9c9fd611e9fddcbf95ce86662c0b777ac Mon Sep 17 00:00:00 2001 From: asofold Date: Fri, 9 Nov 2012 09:24:39 +0100 Subject: [PATCH] Add getter: ViolationData.getPermissionSilent. --- .../nocheatplus/actions/types/LogAction.java | 2 +- .../neatmonster/nocheatplus/checks/ViolationData.java | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/fr/neatmonster/nocheatplus/actions/types/LogAction.java b/src/fr/neatmonster/nocheatplus/actions/types/LogAction.java index b67b76b0..17662611 100644 --- a/src/fr/neatmonster/nocheatplus/actions/types/LogAction.java +++ b/src/fr/neatmonster/nocheatplus/actions/types/LogAction.java @@ -70,7 +70,7 @@ public class LogAction extends ActionWithParameters { public boolean execute(final ViolationData violationData) { final ConfigFile configurationFile = ConfigManager.getConfigFile(); if (configurationFile.getBoolean(ConfPaths.LOGGING_ACTIVE) - && !violationData.player.hasPermission(violationData.actions.permissionSilent)) { + && !violationData.player.hasPermission(violationData.getPermissionSilent())) { final String message = super.getMessage(violationData); if (toChat && configurationFile.getBoolean(ConfPaths.LOGGING_INGAMECHAT)) for (final Player otherPlayer : Bukkit.getServer().getOnlinePlayers()) diff --git a/src/fr/neatmonster/nocheatplus/checks/ViolationData.java b/src/fr/neatmonster/nocheatplus/checks/ViolationData.java index 07b97870..b9856106 100644 --- a/src/fr/neatmonster/nocheatplus/checks/ViolationData.java +++ b/src/fr/neatmonster/nocheatplus/checks/ViolationData.java @@ -22,7 +22,8 @@ import fr.neatmonster.nocheatplus.checks.access.IViolationInfo; /** * Violation specific data, for executing actions.
* This is meant to capture a violation incident in a potentially thread safe way. - * + *
+ * TODO: Re-think visibility questions. * @author asofold */ public class ViolationData implements IViolationInfo{ @@ -167,4 +168,12 @@ public class ViolationData implements IViolationInfo{ public double getTotalVl() { return vL; } + + public String getPermissionSilent() { + return actions.permissionSilent; + } + + public ActionList getActionList(){ + return actions; + } }