Add getter: ViolationData.getPermissionSilent.

This commit is contained in:
asofold 2012-11-09 09:24:39 +01:00
parent 8ac003508f
commit d4e171b9c9
2 changed files with 11 additions and 2 deletions

View File

@ -70,7 +70,7 @@ public class LogAction extends ActionWithParameters {
public boolean execute(final ViolationData violationData) { public boolean execute(final ViolationData violationData) {
final ConfigFile configurationFile = ConfigManager.getConfigFile(); final ConfigFile configurationFile = ConfigManager.getConfigFile();
if (configurationFile.getBoolean(ConfPaths.LOGGING_ACTIVE) if (configurationFile.getBoolean(ConfPaths.LOGGING_ACTIVE)
&& !violationData.player.hasPermission(violationData.actions.permissionSilent)) { && !violationData.player.hasPermission(violationData.getPermissionSilent())) {
final String message = super.getMessage(violationData); final String message = super.getMessage(violationData);
if (toChat && configurationFile.getBoolean(ConfPaths.LOGGING_INGAMECHAT)) if (toChat && configurationFile.getBoolean(ConfPaths.LOGGING_INGAMECHAT))
for (final Player otherPlayer : Bukkit.getServer().getOnlinePlayers()) for (final Player otherPlayer : Bukkit.getServer().getOnlinePlayers())

View File

@ -22,7 +22,8 @@ import fr.neatmonster.nocheatplus.checks.access.IViolationInfo;
/** /**
* Violation specific data, for executing actions.<br> * Violation specific data, for executing actions.<br>
* This is meant to capture a violation incident in a potentially thread safe way. * This is meant to capture a violation incident in a potentially thread safe way.
* * <hr>
* TODO: Re-think visibility questions.
* @author asofold * @author asofold
*/ */
public class ViolationData implements IViolationInfo{ public class ViolationData implements IViolationInfo{
@ -167,4 +168,12 @@ public class ViolationData implements IViolationInfo{
public double getTotalVl() { public double getTotalVl() {
return vL; return vL;
} }
public String getPermissionSilent() {
return actions.permissionSilent;
}
public ActionList getActionList(){
return actions;
}
} }