Add some comments to ChannelOptions

This commit is contained in:
Draycia committed 2020-09-28 05:00:09 -07:00
1 parent 2ee3392308
commit 14dfcfbf38
1 file changed
+77 -25
@@ -16,31 +16,83 @@ import java.util.Map;
@ConfigSerializable @ConfigSerializable
public class ChannelOptions { public class ChannelOptions {
@Setting private String key = "channel"; @Setting(comment = "What this channel is identified as. This will be what's typed ingame to use the channel.")
@Setting private String color; private String key = "channel";
@Setting private Map<String, Context> contexts = new HashMap<>(); // TODO: set defaults
@Setting private Map<String, String> formats = new HashMap<>(); // TODO: set defaults @Setting(comment = "This is what the <color> placeholder will typically be replaced with.\n" +
@Setting private String defaultFormatName; "Hex RGB (#B19CD9), named colors (light_purple), legacy (&d), and legacy RGB (&x&b&1&2&c&d&9) are all supported.\n" +
@Setting private boolean isDefault = false; // primitive because missing = false "If on a platform that supports PlaceholderAPI, this option will be ran through that as well.\n" +
@Setting private Boolean ignorable; // boxed because missing = use defaults "Note that the <color> placeholder is also used for personal and global user colors.")
@Setting private Boolean crossServer; private String color;
@Setting private Boolean honorsRecipientList;
@Setting private Boolean permissionGroupMatching; @Setting(comment = "The contexts for this channel, ")
@Setting private List<String> groupOverrides; private Map<String, Context> contexts = new HashMap<>(); // TODO: set defaults
@Setting private String name = "";
@Setting private String messagePrefix = ""; @Setting(comment = "The formats for this channel. The key is the name of the group as your permissions plugin reports it.")
@Setting private List<String> aliases = new ArrayList<>(); private Map<String, String> formats = new HashMap<>(); // TODO: set defaults
@Setting private Boolean shouldCancelChatEvent;
@Setting private Boolean primaryGroupOnly; @Setting(comment = "The name of the format that the plugin will fall back to when it cannot find a matching format for the player's groups.")
@Setting private String switchMessage; private String defaultFormatName;
@Setting private String switchOtherMessage;
@Setting private String switchFailureMessage; @Setting(comment = "")
@Setting private String toggleOnMessage; private boolean isDefault = false; // primitive because missing = false
@Setting private String toggleOffMessage;
@Setting private String toggleOtherOnMessage; @Setting(comment = "")
@Setting private String toggleOtherOffMessage; private Boolean ignorable; // boxed because missing = use defaults
@Setting private String cannotUseMessage;
@Setting private String cannotIgnoreMessage; @Setting(comment = "")
private Boolean crossServer;
@Setting(comment = "")
private Boolean honorsRecipientList;
@Setting(comment = "")
private Boolean permissionGroupMatching;
@Setting(comment = "")
private List<String> groupOverrides;
@Setting(comment = "")
private String name = "";
@Setting(comment = "")
private String messagePrefix = "";
@Setting(comment = "")
private List<String> aliases = new ArrayList<>();
@Setting(comment = "")
private Boolean shouldCancelChatEvent;
@Setting(comment = "")
private Boolean primaryGroupOnly;
@Setting(comment = "")
private String switchMessage;
@Setting(comment = "")
private String switchOtherMessage;
@Setting(comment = "")
private String switchFailureMessage;
@Setting(comment = "")
private String toggleOnMessage;
@Setting(comment = "")
private String toggleOffMessage;
@Setting(comment = "")
private String toggleOtherOnMessage;
@Setting(comment = "")
private String toggleOtherOffMessage;
@Setting(comment = "")
private String cannotUseMessage;
@Setting(comment = "")
private String cannotIgnoreMessage;
private SharedChannelOptions defaultOptions() { private SharedChannelOptions defaultOptions() {
return CarbonChatProvider.carbonChat().channelSettings().defaultChannelOptions(); return CarbonChatProvider.carbonChat().channelSettings().defaultChannelOptions();