Add Section

This commit is contained in:
RayzsYT committed 2024-05-19 19:55:50 +02:00
1 parent f4fcf2a776
commit a325f23838
2 files changed
+28

No files matched your search

@@ -33,6 +33,7 @@ public class Storage {
public static GroupSection GROUP = new GroupSection();
public static HelpSection HELP = new HelpSection();
public static NoPermissionSection NO_PERMISSION = new NoPermissionSection();
public static NotificationSection NOTIFICATION = new NotificationSection();
public static OnlyForProxySection NO_PROXY = new OnlyForProxySection();
public static ReloadSection RELOAD = new ReloadSection();
public static StatsSection STATS_SECTION = new StatsSection();
@@ -0,0 +1,27 @@
package de.rayzs.pat.api.storage.config.messages;
import de.rayzs.pat.api.storage.templates.ConfigStorage;
import de.rayzs.pat.utils.Reflection;
import de.rayzs.pat.utils.configuration.helper.ConfigSectionHelper;
import de.rayzs.pat.utils.configuration.helper.MultipleMessagesHelper;
import java.util.Arrays;
import java.util.Collections;
public class NotificationSection extends ConfigStorage {
public String ENABLED, DISABLED;
public MultipleMessagesHelper ALERT;
public NotificationSection() {
super("notification");
}
@Override
public void load() {
super.load();
ENABLED = new ConfigSectionHelper<String>(this, "enabled", "&aEnabled notifications").getOrSet();
DISABLED = new ConfigSectionHelper<String>(this, "disabled", "&cDisabled notifications").getOrSet();
ALERT = new MultipleMessagesHelper(this, "alert", Collections.singletonList("&8[&4ALERT&8] &c%player% &8(&7" + (Reflection.isProxyServer() ? "server: &e%server%" : "world: &e%world%") + "&8) &ctried to execute the following blocked command: &4%command%"));
}
}