diff --git a/common/src/main/java/net/draycia/carbon/common/channels/ConfigChannelSettings.java b/common/src/main/java/net/draycia/carbon/common/channels/ConfigChannelSettings.java index 461f3aa4..fced14f2 100644 --- a/common/src/main/java/net/draycia/carbon/common/channels/ConfigChannelSettings.java +++ b/common/src/main/java/net/draycia/carbon/common/channels/ConfigChannelSettings.java @@ -36,8 +36,7 @@ public final class ConfigChannelSettings { You only need to change the second part of the key. "global" by default. The value is what's used in commands, this is probably what you want to change. """) - private @Nullable - final Key key = Key.key("carbon", "basic"); + private @Nullable Key key = Key.key("carbon", "basic"); @Comment(""" The permission required to use the channel. @@ -45,25 +44,19 @@ public final class ConfigChannelSettings { To send messages you must have the permission carbon.channel.basic.speak If you want to give both, grant carbon.channel.basic or carbon.channel.basic.* """) - private @Nullable - final String permission = "carbon.channel.basic"; + private @Nullable String permission = "carbon.channel.basic"; @Setting("format") @Comment("The chat formats for this channel.") - private @Nullable - final ConfigChannelMessageSource messageSource = new ConfigChannelMessageSource(); + private @Nullable ConfigChannelMessageSource messageSource = new ConfigChannelMessageSource(); @Comment("Messages will be sent in this channel if they start with this prefix.") - private @Nullable - final String quickPrefix = ""; + private @Nullable String quickPrefix = ""; - private @Nullable - final Boolean shouldRegisterCommands = true; + private @Nullable Boolean shouldRegisterCommands = true; - private @Nullable - final String commandName = null; + private @Nullable String commandName = null; - private @Nullable - final List commandAliases = Collections.emptyList(); + private @Nullable List commandAliases = Collections.emptyList(); } diff --git a/common/src/main/java/net/draycia/carbon/common/channels/ConfigChatChannel.java b/common/src/main/java/net/draycia/carbon/common/channels/ConfigChatChannel.java index 54310a40..3d007b5b 100644 --- a/common/src/main/java/net/draycia/carbon/common/channels/ConfigChatChannel.java +++ b/common/src/main/java/net/draycia/carbon/common/channels/ConfigChatChannel.java @@ -75,8 +75,7 @@ public final class ConfigChatChannel implements ChatChannel { You only need to change the second part of the key. "global" by default. The value is what's used in commands, this is probably what you want to change. """) - private @Nullable - final Key key = Key.key("carbon", "global"); + private @Nullable Key key = Key.key("carbon", "global"); @Comment(""" The permission required to use the /channel and / commands. @@ -85,26 +84,23 @@ public final class ConfigChatChannel implements ChatChannel { To read messages you must have the permission carbon.channel.global.see To send messages you must have the permission carbon.channel.global.speak """) - private @Nullable - final String permission = "carbon.channel.global"; + private @Nullable String permission = "carbon.channel.global"; @Setting("format") @Comment("The chat formats for this channel.") - private @Nullable - final ConfigChannelMessageSource messageSource = new ConfigChannelMessageSource(); + private @Nullable ConfigChannelMessageSource messageSource = new ConfigChannelMessageSource(); @Comment("Messages will be sent in this channel if they start with this prefix.") - private @Nullable - final String quickPrefix = ""; + private @Nullable String quickPrefix = ""; private @Nullable - final Boolean shouldRegisterCommands = true; + Boolean shouldRegisterCommands = true; private @Nullable - final String commandName = null; + String commandName = null; private @Nullable - final List commandAliases = Collections.emptyList(); + List commandAliases = Collections.emptyList(); private transient @Nullable ConfigChannelMessages carbonMessages = null; @@ -113,9 +109,9 @@ public final class ConfigChatChannel implements ChatChannel { A value of '0' requires that both players are in the same world. On velocity, '0' requires that both players are in the same server. """) - private final int radius = -1; + private int radius = -1; - private final transient @Nullable ConfigChannelMessages messageService = null; + private transient @Nullable ConfigChannelMessages messageService = null; @Override public @Nullable String quickPrefix() { diff --git a/common/src/main/java/net/draycia/carbon/common/channels/messages/ConfigChannelMessageSource.java b/common/src/main/java/net/draycia/carbon/common/channels/messages/ConfigChannelMessageSource.java index 7530a932..3af2052c 100644 --- a/common/src/main/java/net/draycia/carbon/common/channels/messages/ConfigChannelMessageSource.java +++ b/common/src/main/java/net/draycia/carbon/common/channels/messages/ConfigChannelMessageSource.java @@ -53,7 +53,7 @@ public class ConfigChannelMessageSource implements IMessageSource defaults = Map.of( + private Map defaults = Map.of( "default_format", ": ", "console", "[] - : " ); @@ -64,7 +64,7 @@ public class ConfigChannelMessageSource implements IMessageSource> locales = Map.of( + private Map> locales = Map.of( Locale.US, Map.of("default_format", ": ") ); diff --git a/common/src/main/java/net/draycia/carbon/common/config/ClearChatSettings.java b/common/src/main/java/net/draycia/carbon/common/config/ClearChatSettings.java index 38536d75..b3ccac46 100644 --- a/common/src/main/java/net/draycia/carbon/common/config/ClearChatSettings.java +++ b/common/src/main/java/net/draycia/carbon/common/config/ClearChatSettings.java @@ -35,13 +35,13 @@ import org.spongepowered.configurate.objectmapping.meta.Comment; public class ClearChatSettings { @Comment("The message that will be sent to each player.") - private final String message = ""; + private String message = ""; @Comment("The number of times the message will be sent to each player.") - private final int iterations = 50; + private int iterations = 50; @Comment("The message to be sent after chat is cleared.") - private final String broadcast = "Chat has been cleared by ."; + private String broadcast = "Chat has been cleared by ."; private @MonotonicNonNull Component messageComponent = null; diff --git a/common/src/main/java/net/draycia/carbon/common/config/DatabaseSettings.java b/common/src/main/java/net/draycia/carbon/common/config/DatabaseSettings.java index 3449144f..2c2d6a57 100644 --- a/common/src/main/java/net/draycia/carbon/common/config/DatabaseSettings.java +++ b/common/src/main/java/net/draycia/carbon/common/config/DatabaseSettings.java @@ -29,13 +29,13 @@ import org.spongepowered.configurate.objectmapping.meta.Comment; public class DatabaseSettings { @Comment("JDBC URL") - private final String url = "jdbc:mysql://localhost:3306/carbon"; + private String url = "jdbc:mysql://localhost:3306/carbon"; @Comment("") - private final String username = "username"; + private String username = "username"; @Comment("") - private final String password = "password"; + private String password = "password"; public String url() { return this.url; diff --git a/common/src/main/java/net/draycia/carbon/common/config/MessagingSettings.java b/common/src/main/java/net/draycia/carbon/common/config/MessagingSettings.java index 2d012995..45c108b5 100644 --- a/common/src/main/java/net/draycia/carbon/common/config/MessagingSettings.java +++ b/common/src/main/java/net/draycia/carbon/common/config/MessagingSettings.java @@ -30,28 +30,28 @@ import org.spongepowered.configurate.objectmapping.meta.Comment; @ConfigSerializable public class MessagingSettings { - private final boolean enabled = false; + private boolean enabled = false; @Comment("Options: RABBITMQ, NATS, REDIS") - private final MessagingManager.@NonNull BrokerType brokerType = MessagingManager.BrokerType.NONE; + private MessagingManager.@NonNull BrokerType brokerType = MessagingManager.BrokerType.NONE; @Comment("") - private final String url = "127.0.0.1"; + private String url = "127.0.0.1"; @Comment("") - private final int port = 5672; // RabbitMQ 5672, NATS 4222, Redis 6379 + private int port = 5672; // RabbitMQ 5672, NATS 4222, Redis 6379 @Comment("RabbitMQ VHost") - private final String vhost = "/"; // RabbitMQ only + private String vhost = "/"; // RabbitMQ only @Comment("NATS credentials file") - private final String credentialsFile = ""; // NATS only + private String credentialsFile = ""; // NATS only @Comment("RabbitMQ username") - private final String username = "username"; // RabbitMQ only + private String username = "username"; // RabbitMQ only @Comment("RabbitMQ and Redis password") - private final String password = "password"; // RabbitMQ and Redis only + private String password = "password"; // RabbitMQ and Redis only public boolean enabled() { return this.enabled; diff --git a/common/src/main/java/net/draycia/carbon/common/config/PingSettings.java b/common/src/main/java/net/draycia/carbon/common/config/PingSettings.java index 563d1db9..615e531f 100644 --- a/common/src/main/java/net/draycia/carbon/common/config/PingSettings.java +++ b/common/src/main/java/net/draycia/carbon/common/config/PingSettings.java @@ -30,15 +30,15 @@ import org.spongepowered.configurate.objectmapping.meta.Comment; public class PingSettings { @Comment("The color your name will be when another player mentions you.") - private final TextColor highlightTextColor = NamedTextColor.YELLOW; + private TextColor highlightTextColor = NamedTextColor.YELLOW; - private final String prefix = "@"; + private String prefix = "@"; - private final boolean playSound = false; - private final Key name = Key.key("block.anvil.use"); - private final Sound.Source source = Sound.Source.MASTER; - private final float volume = 1.0f; // 0.0 -> infinity - private final float pitch = 1.0f; // 0.0 -> 2.0 + private boolean playSound = false; + private Key name = Key.key("block.anvil.use"); + private Sound.Source source = Sound.Source.MASTER; + private float volume = 1.0f; // 0.0 -> infinity + private float pitch = 1.0f; // 0.0 -> 2.0 public TextColor highlightTextColor() { return this.highlightTextColor; diff --git a/common/src/main/java/net/draycia/carbon/common/config/PrimaryConfig.java b/common/src/main/java/net/draycia/carbon/common/config/PrimaryConfig.java index 08dc34e4..2da9027f 100644 --- a/common/src/main/java/net/draycia/carbon/common/config/PrimaryConfig.java +++ b/common/src/main/java/net/draycia/carbon/common/config/PrimaryConfig.java @@ -32,22 +32,22 @@ import org.spongepowered.configurate.objectmapping.meta.Comment; public class PrimaryConfig { @Comment("The default locale for plugin messages.") - private final Locale defaultLocale = Locale.US; + private Locale defaultLocale = Locale.US; @Comment(""" The default channel that new players will be in when they join. If the channel is not found or the player cannot use the channel, they will speak in basic non-channel chat. """) - private final Key defaultChannel = Key.key("carbon", "global"); + private Key defaultChannel = Key.key("carbon", "global"); @Comment("The service that will be used to store and load player information.") - private final StorageType storageType = StorageType.JSON; + private StorageType storageType = StorageType.JSON; @Comment("") - private final DatabaseSettings databaseSettings = new DatabaseSettings(); + private DatabaseSettings databaseSettings = new DatabaseSettings(); @Comment("Various ClearChat command settings.") - private final ClearChatSettings clearChatSettings = new ClearChatSettings(); + private ClearChatSettings clearChatSettings = new ClearChatSettings(); @Comment(""" Plugin-wide custom placeholders. @@ -56,12 +56,12 @@ public class PrimaryConfig { Make sure to close your tags so they do not bleed into other formats. Only a single pass is done so custom placeholders will not work within each other. """) - private final Map customPlaceholders = Map.of(); + private Map customPlaceholders = Map.of(); @Comment("Various settings related to pinging players in channels.") - private final PingSettings pingSettings = new PingSettings(); + private PingSettings pingSettings = new PingSettings(); - private final MessagingSettings messagingSettings = new MessagingSettings(); + private MessagingSettings messagingSettings = new MessagingSettings(); public Locale defaultLocale() { return this.defaultLocale;