mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-06 18:50:54 +01:00
Add getter: ViolationData.getPermissionSilent.
This commit is contained in:
parent
8ac003508f
commit
d4e171b9c9
@ -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())
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user