mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Make log notifications toggleable
This commit is contained in:
parent
b37fdd3619
commit
9b4bbe0500
@ -39,6 +39,9 @@ apply-regex: true
|
||||
# If set to true, LuckPerms will detect and expand shorthand node patterns.
|
||||
apply-shorthand: true
|
||||
|
||||
# If the plugin should send log notifications to users whenever permissions are modified.
|
||||
log-notify: true
|
||||
|
||||
# Which storage method the plugin should use.
|
||||
# Currently supported: mysql, sqlite, h2, flatfile, mongodb
|
||||
# Fill out connection info below if you're using MySQL or MongoDB
|
||||
|
@ -39,6 +39,9 @@ apply-regex: true
|
||||
# If set to true, LuckPerms will detect and expand shorthand node patterns.
|
||||
apply-shorthand: true
|
||||
|
||||
# If the plugin should send log notifications to users whenever permissions are modified.
|
||||
log-notify: true
|
||||
|
||||
# Which storage method the plugin should use.
|
||||
# Currently supported: mysql, sqlite, h2, flatfile, mongodb
|
||||
# Fill out connection info below if you're using MySQL or MongoDB
|
||||
|
@ -102,6 +102,10 @@ public abstract class LPConfiguration<T extends LuckPermsPlugin> {
|
||||
return getBoolean("apply-shorthand", true);
|
||||
}
|
||||
|
||||
public boolean getLogNotify() {
|
||||
return getBoolean("log-notify", true);
|
||||
}
|
||||
|
||||
public DatastoreConfiguration getDatabaseValues() {
|
||||
return new DatastoreConfiguration(
|
||||
getString("data.address", null),
|
||||
|
@ -52,6 +52,7 @@ public class LogEntry extends me.lucko.luckperms.api.LogEntry {
|
||||
plugin.getDatastore().logAction(this);
|
||||
|
||||
LogNotifyEvent event = new LogNotifyEvent(this);
|
||||
event.setCancelled(plugin.getConfiguration().getLogNotify());
|
||||
plugin.getApiProvider().fireEvent(event);
|
||||
if (event.isCancelled()) return;
|
||||
|
||||
|
@ -39,6 +39,9 @@ apply-regex=true
|
||||
# If set to true, LuckPerms will detect and expand shorthand node patterns.
|
||||
apply-shorthand=true
|
||||
|
||||
# If the plugin should send log notifications to users whenever permissions are modified.
|
||||
log-notify=true
|
||||
|
||||
# Which storage method the plugin should use.
|
||||
# Currently supported: mysql, sqlite, h2, flatfile, mongodb
|
||||
# Fill out connection info below if you're using MySQL or MongoDB
|
||||
|
Loading…
Reference in New Issue
Block a user