diff --git a/Main Plugin/pom.xml b/Main Plugin/pom.xml
index e510ab0..a19b525 100644
--- a/Main Plugin/pom.xml
+++ b/Main Plugin/pom.xml
@@ -105,5 +105,11 @@
4.12
test
+
+ org.projectlombok
+ lombok
+ 1.16.16
+ provided
+
\ No newline at end of file
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/section/SectionManager.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/section/SectionManager.java
index 5f7a0d0..d2a3c10 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/section/SectionManager.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/section/SectionManager.java
@@ -92,7 +92,7 @@ public class SectionManager {
if (sectionProps.getProvider() == null) {
ServerSection current = section.getParent();
if (current != null) {
- while (current.getExplicitProvider() == null) {
+ while (current.getProps().getProvider() == null) {
current = current.getParent();
}
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/section/ServerSection.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/section/ServerSection.java
index 66b94ce..58c56c8 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/section/ServerSection.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/section/ServerSection.java
@@ -4,12 +4,14 @@ import com.jaimemartz.playerbalancer.connection.ProviderType;
import com.jaimemartz.playerbalancer.connection.provider.AbstractProvider;
import com.jaimemartz.playerbalancer.settings.props.shared.SectionProps;
import com.jaimemartz.playerbalancer.utils.AlphanumComparator;
+import lombok.Data;
import net.md_5.bungee.api.config.ServerInfo;
import java.util.Collections;
import java.util.Set;
import java.util.TreeSet;
+@Data
public class ServerSection {
private final String name;
private final SectionProps props;
@@ -34,104 +36,11 @@ public class ServerSection {
));
}
- public String getName() {
- return name;
- }
-
- public int getPosition() {
- return position;
- }
-
- public void setPosition(int position) {
- this.position = position;
- }
-
- public SectionProps getProps() {
- return props;
- }
-
- public boolean isInherited() {
- return inherited;
- }
-
- public void setInherited(boolean inherited) {
- this.inherited = inherited;
- }
-
- public ServerSection getParent() {
- return parent;
- }
-
- public void setParent(ServerSection parent) {
- this.parent = parent;
- }
-
public ProviderType getImplicitProvider() {
if (inherited) {
return parent.getImplicitProvider();
} else {
return props.getProvider();
}
-
- }
-
- public ProviderType getExplicitProvider() {
- return props.getProvider();
- }
-
- public void setExplicitProvider(ProviderType provider) {
- props.setProvider(provider);
- inherited = false;
- }
-
- public void setExternalProvider(AbstractProvider externalProvider) {
- this.externalProvider = externalProvider;
- }
-
- public AbstractProvider getExternalProvider() {
- return externalProvider;
- }
-
- public ServerInfo getServer() {
- return server;
- }
-
- public void setServer(ServerInfo server) {
- this.server = server;
- }
-
- public SectionCommand getCommand() {
- return command;
- }
-
- public void setCommand(SectionCommand command) {
- this.command = command;
- }
-
- public Set getServers() {
- return servers;
- }
-
- public boolean isValid() {
- return valid;
- }
-
- public void setValid(boolean valid) {
- this.valid = valid;
- }
-
- @Override
- public String toString() {
- return "ServerSection{" +
- "name='" + name + '\'' +
- ", props=" + props +
- ", inherited=" + inherited +
- ", parent=" + parent +
- ", position=" + position +
- ", server=" + server +
- ", command=" + command +
- ", servers=" + servers +
- ", valid=" + valid +
- '}';
}
}
\ No newline at end of file
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/FeaturesProps.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/FeaturesProps.java
index be99358..f4d41b0 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/FeaturesProps.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/FeaturesProps.java
@@ -1,10 +1,12 @@
package com.jaimemartz.playerbalancer.settings.props;
import com.jaimemartz.playerbalancer.settings.props.features.*;
+import lombok.Data;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
+@Data
public class FeaturesProps {
@Setting(value = "balancer")
private BalancerProps balancerProps;
@@ -20,55 +22,4 @@ public class FeaturesProps {
@Setting(value = "server-refresh")
private ServerRefreshProps serverRefreshProps;
-
- public BalancerProps getBalancerProps() {
- return balancerProps;
- }
-
- public void setBalancerProps(BalancerProps balancerProps) {
- this.balancerProps = balancerProps;
- }
-
- public FallbackCommandProps getFallbackCommandProps() {
- return fallbackCommandProps;
- }
-
- public void setFallbackCommandProps(FallbackCommandProps fallbackCommandProps) {
- this.fallbackCommandProps = fallbackCommandProps;
- }
-
- public ServerCheckerProps getServerCheckerProps() {
- return serverCheckerProps;
- }
-
- public void setServerCheckerProps(ServerCheckerProps serverCheckerProps) {
- this.serverCheckerProps = serverCheckerProps;
- }
-
- public KickHandlerProps getKickHandlerProps() {
- return kickHandlerProps;
- }
-
- public void setKickHandlerProps(KickHandlerProps kickHandlerProps) {
- this.kickHandlerProps = kickHandlerProps;
- }
-
- public ServerRefreshProps getServerRefreshProps() {
- return serverRefreshProps;
- }
-
- public void setServerRefreshProps(ServerRefreshProps serverRefreshProps) {
- this.serverRefreshProps = serverRefreshProps;
- }
-
- @Override
- public String toString() {
- return "FeaturesProps{" +
- "balancerProps=" + balancerProps +
- ", fallbackCommandProps=" + fallbackCommandProps +
- ", serverCheckerProps=" + serverCheckerProps +
- ", kickHandlerProps=" + kickHandlerProps +
- ", serverRefreshProps=" + serverRefreshProps +
- '}';
- }
}
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/GeneralProps.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/GeneralProps.java
index 8422d0e..ce33895 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/GeneralProps.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/GeneralProps.java
@@ -1,9 +1,11 @@
package com.jaimemartz.playerbalancer.settings.props;
+import lombok.Data;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
+@Data
public class GeneralProps {
@Setting
private boolean enabled;
@@ -22,64 +24,4 @@ public class GeneralProps {
@Setting
private String version;
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
- public boolean isSilent() {
- return silent;
- }
-
- public void setSilent(boolean silent) {
- this.silent = silent;
- }
-
- public boolean isAutoReload() {
- return autoReload;
- }
-
- public void setAutoReload(boolean autoReload) {
- this.autoReload = autoReload;
- }
-
- public boolean isRedisBungee() {
- return redisBungee;
- }
-
- public void setRedisBungee(boolean redisBungee) {
- this.redisBungee = redisBungee;
- }
-
- public boolean isPluginMessaging() {
- return pluginMessaging;
- }
-
- public void setPluginMessaging(boolean pluginMessaging) {
- this.pluginMessaging = pluginMessaging;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- @Override
- public String toString() {
- return "GeneralProps{" +
- "enabled=" + enabled +
- ", silent=" + silent +
- ", autoReload=" + autoReload +
- ", redisBungee=" + redisBungee +
- ", pluginMessaging=" + pluginMessaging +
- ", version='" + version + '\'' +
- '}';
- }
}
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/MessagesProps.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/MessagesProps.java
index fefc18e..2f21b04 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/MessagesProps.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/MessagesProps.java
@@ -1,9 +1,11 @@
package com.jaimemartz.playerbalancer.settings.props;
+import lombok.Data;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
+@Data
public class MessagesProps {
@Setting(value = "connecting-server")
private String connectingMessage;
@@ -31,91 +33,4 @@ public class MessagesProps {
@Setting(value = "same-section")
private String sameSectionMessage;
-
- public String getConnectingMessage() {
- return connectingMessage;
- }
-
- public void setConnectingMessage(String connectingMessage) {
- this.connectingMessage = connectingMessage;
- }
-
- public String getConnectedMessage() {
- return connectedMessage;
- }
-
- public void setConnectedMessage(String connectedMessage) {
- this.connectedMessage = connectedMessage;
- }
-
- public String getFailureMessage() {
- return failureMessage;
- }
-
- public void setFailureMessage(String failureMessage) {
- this.failureMessage = failureMessage;
- }
-
- public String getUnknownSectionMessage() {
- return unknownSectionMessage;
- }
-
- public void setUnknownSectionMessage(String unknownSectionMessage) {
- this.unknownSectionMessage = unknownSectionMessage;
- }
-
- public String getInvalidInputMessage() {
- return invalidInputMessage;
- }
-
- public void setInvalidInputMessage(String invalidInputMessage) {
- this.invalidInputMessage = invalidInputMessage;
- }
-
- public String getUnavailableServerMessage() {
- return unavailableServerMessage;
- }
-
- public void setUnavailableServerMessage(String unavailableServerMessage) {
- this.unavailableServerMessage = unavailableServerMessage;
- }
-
- public String getKickMessage() {
- return kickMessage;
- }
-
- public void setKickMessage(String kickMessage) {
- this.kickMessage = kickMessage;
- }
-
- public String getBypassMessage() {
- return bypassMessage;
- }
-
- public void setBypassMessage(String bypassMessage) {
- this.bypassMessage = bypassMessage;
- }
-
- public String getSameSectionMessage() {
- return sameSectionMessage;
- }
-
- public void setSameSectionMessage(String sameSectionMessage) {
- this.sameSectionMessage = sameSectionMessage;
- }
-
- @Override
- public String toString() {
- return "MessagesProps{" +
- "connectingMessage=" + connectingMessage +
- ", connectedMessage=" + connectedMessage +
- ", failureMessage=" + failureMessage +
- ", unknownSectionMessage=" + unknownSectionMessage +
- ", invalidInputMessage=" + invalidInputMessage +
- ", unavailableServerMessage=" + unavailableServerMessage +
- ", kickMessage=" + kickMessage +
- ", bypassMessage=" + bypassMessage +
- ", sameSectionMessage=" + sameSectionMessage +
- '}';
- }
}
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/BalancerProps.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/BalancerProps.java
index a5f5621..5da5bcb 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/BalancerProps.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/BalancerProps.java
@@ -1,6 +1,7 @@
package com.jaimemartz.playerbalancer.settings.props.features;
import com.jaimemartz.playerbalancer.settings.props.shared.SectionProps;
+import lombok.Data;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@@ -8,6 +9,7 @@ import java.util.List;
import java.util.Map;
@ConfigSerializable
+@Data
public class BalancerProps {
@Setting(value = "principal-section")
private String principalSectionName;
@@ -26,64 +28,4 @@ public class BalancerProps {
@Setting(value = "show-players")
private boolean showPlayers;
-
- public String getPrincipalSectionName() {
- return principalSectionName;
- }
-
- public void setPrincipalSectionName(String principalSectionName) {
- this.principalSectionName = principalSectionName;
- }
-
- public List getDummySectionNames() {
- return dummySectionNames;
- }
-
- public void setDummySectionNames(List dummySectionNames) {
- this.dummySectionNames = dummySectionNames;
- }
-
- public List getReiterativeSectionNames() {
- return reiterativeSectionNames;
- }
-
- public void setReiterativeSectionNames(List reiterativeSectionNames) {
- this.reiterativeSectionNames = reiterativeSectionNames;
- }
-
- public Map getSectionProps() {
- return sectionProps;
- }
-
- public void setSectionProps(Map sectionProps) {
- this.sectionProps = sectionProps;
- }
-
- public boolean isShowPlayers() {
- return showPlayers;
- }
-
- public void setShowPlayers(boolean showPlayers) {
- this.showPlayers = showPlayers;
- }
-
- public boolean isDefaultPrincipal() {
- return defaultPrincipal;
- }
-
- public void setDefaultPrincipal(boolean defaultPrincipal) {
- this.defaultPrincipal = defaultPrincipal;
- }
-
- @Override
- public String toString() {
- return "BalancerProps{" +
- "principalSectionName='" + principalSectionName + '\'' +
- ", defaultPrincipal=" + defaultPrincipal +
- ", dummySectionNames=" + dummySectionNames +
- ", reiterativeSectionNames=" + reiterativeSectionNames +
- ", sectionProps=" + sectionProps +
- ", showPlayers=" + showPlayers +
- '}';
- }
}
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/CustomListProps.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/CustomListProps.java
new file mode 100644
index 0000000..a0d7544
--- /dev/null
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/CustomListProps.java
@@ -0,0 +1,10 @@
+package com.jaimemartz.playerbalancer.settings.props.features;
+
+import lombok.Data;
+import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
+
+@ConfigSerializable
+@Data
+public class CustomListProps {
+
+}
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/FallbackCommandProps.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/FallbackCommandProps.java
index 5f580f4..14d01c6 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/FallbackCommandProps.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/FallbackCommandProps.java
@@ -1,6 +1,7 @@
package com.jaimemartz.playerbalancer.settings.props.features;
import com.jaimemartz.playerbalancer.settings.props.shared.CommandProps;
+import lombok.Data;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@@ -8,6 +9,7 @@ import java.util.List;
import java.util.Map;
@ConfigSerializable
+@Data
public class FallbackCommandProps {
@Setting
private boolean enabled;
@@ -26,64 +28,4 @@ public class FallbackCommandProps {
@Setting
private Map rules;
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
- public CommandProps getCommand() {
- return command;
- }
-
- public void setCommand(CommandProps command) {
- this.command = command;
- }
-
- public List getExcludedSections() {
- return excludedSections;
- }
-
- public void setExcludedSections(List excludedSections) {
- this.excludedSections = excludedSections;
- }
-
- public boolean isRestrictive() {
- return restrictive;
- }
-
- public void setRestrictive(boolean restrictive) {
- this.restrictive = restrictive;
- }
-
- public boolean isPreventSameSection() {
- return preventSameSection;
- }
-
- public void setPreventSameSection(boolean preventSameSection) {
- this.preventSameSection = preventSameSection;
- }
-
- public Map getRules() {
- return rules;
- }
-
- public void setRules(Map rules) {
- this.rules = rules;
- }
-
- @Override
- public String toString() {
- return "FallbackCommandProps{" +
- "enabled=" + enabled +
- ", command=" + command +
- ", excludedSections=" + excludedSections +
- ", restrictive=" + restrictive +
- ", preventSameSection=" + preventSameSection +
- ", rules=" + rules +
- '}';
- }
}
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/KickHandlerProps.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/KickHandlerProps.java
index 671223b..083422c 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/KickHandlerProps.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/KickHandlerProps.java
@@ -1,5 +1,6 @@
package com.jaimemartz.playerbalancer.settings.props.features;
+import lombok.Data;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@@ -7,6 +8,7 @@ import java.util.List;
import java.util.Map;
@ConfigSerializable
+@Data
public class KickHandlerProps {
@Setting
private boolean enabled;
@@ -31,82 +33,4 @@ public class KickHandlerProps {
@Setting(value = "debug-info")
private boolean debug;
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
- public boolean isInverted() {
- return inverted;
- }
-
- public void setInverted(boolean inverted) {
- this.inverted = inverted;
- }
-
- public List getReasons() {
- return reasons;
- }
-
- public void setReasons(List reasons) {
- this.reasons = reasons;
- }
-
- public List getExcludedSections() {
- return excludedSections;
- }
-
- public void setExcludedSections(List excludedSections) {
- this.excludedSections = excludedSections;
- }
-
- public boolean isRestrictive() {
- return restrictive;
- }
-
- public void setRestrictive(boolean restrictive) {
- this.restrictive = restrictive;
- }
-
- public boolean isForcePrincipal() {
- return forcePrincipal;
- }
-
- public void setForcePrincipal(boolean forcePrincipal) {
- this.forcePrincipal = forcePrincipal;
- }
-
- public Map getRules() {
- return rules;
- }
-
- public void setRules(Map rules) {
- this.rules = rules;
- }
-
- public boolean isDebug() {
- return debug;
- }
-
- public void setDebug(boolean debug) {
- this.debug = debug;
- }
-
- @Override
- public String toString() {
- return "KickHandlerProps{" +
- "enabled=" + enabled +
- ", inverted=" + inverted +
- ", reasons=" + reasons +
- ", excludedSections=" + excludedSections +
- ", restrictive=" + restrictive +
- ", forcePrincipal=" + forcePrincipal +
- ", rules=" + rules +
- ", debug=" + debug +
- '}';
- }
}
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/ServerCheckerProps.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/ServerCheckerProps.java
index bdbc80c..e9013c9 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/ServerCheckerProps.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/ServerCheckerProps.java
@@ -1,12 +1,14 @@
package com.jaimemartz.playerbalancer.settings.props.features;
import com.jaimemartz.playerbalancer.ping.PingTactic;
+import lombok.Data;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
import java.util.List;
@ConfigSerializable
+@Data
public class ServerCheckerProps {
@Setting
private boolean enabled;
@@ -28,73 +30,4 @@ public class ServerCheckerProps {
@Setting(value = "debug-info")
private boolean debug;
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
- public PingTactic getTactic() {
- return tactic;
- }
-
- public void setTactic(PingTactic tactic) {
- this.tactic = tactic;
- }
-
- public int getAttempts() {
- return attempts;
- }
-
- public void setAttempts(int attempts) {
- this.attempts = attempts;
- }
-
- public int getInterval() {
- return interval;
- }
-
- public void setInterval(int interval) {
- this.interval = interval;
- }
-
- public int getTimeout() {
- return timeout;
- }
-
- public void setTimeout(int timeout) {
- this.timeout = timeout;
- }
-
- public List getMarkerDescs() {
- return markerDescs;
- }
-
- public void setMarkerDescs(List markerDescs) {
- this.markerDescs = markerDescs;
- }
-
- public boolean isDebug() {
- return debug;
- }
-
- public void setDebug(boolean debug) {
- this.debug = debug;
- }
-
- @Override
- public String toString() {
- return "ServerCheckerProps{" +
- "enabled=" + enabled +
- ", tactic=" + tactic +
- ", attempts=" + attempts +
- ", interval=" + interval +
- ", timeout=" + timeout +
- ", markerDescs=" + markerDescs +
- ", debug=" + debug +
- '}';
- }
}
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/ServerRefreshProps.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/ServerRefreshProps.java
index 7bf1254..d8a852b 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/ServerRefreshProps.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/features/ServerRefreshProps.java
@@ -1,9 +1,11 @@
package com.jaimemartz.playerbalancer.settings.props.features;
+import lombok.Data;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
+@Data
public class ServerRefreshProps {
@Setting
private boolean enabled;
@@ -13,37 +15,4 @@ public class ServerRefreshProps {
@Setting
private int interval;
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
- public int getDelay() {
- return delay;
- }
-
- public void setDelay(int delay) {
- this.delay = delay;
- }
-
- public int getInterval() {
- return interval;
- }
-
- public void setInterval(int interval) {
- this.interval = interval;
- }
-
- @Override
- public String toString() {
- return "ServerRefreshProps{" +
- "enabled=" + enabled +
- ", delay=" + delay +
- ", interval=" + interval +
- '}';
- }
}
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/shared/CommandProps.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/shared/CommandProps.java
index dca12ce..ebbd9b4 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/shared/CommandProps.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/shared/CommandProps.java
@@ -1,5 +1,6 @@
package com.jaimemartz.playerbalancer.settings.props.shared;
+import lombok.Data;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@@ -7,6 +8,7 @@ import java.util.Collections;
import java.util.List;
@ConfigSerializable
+@Data
public class CommandProps {
@Setting
private String name;
@@ -17,14 +19,6 @@ public class CommandProps {
@Setting
private List aliases;
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
public String getPermission() {
if (permission != null) {
return permission;
@@ -33,10 +27,6 @@ public class CommandProps {
}
}
- public void setPermission(String permission) {
- this.permission = permission;
- }
-
public List getAliases() {
if (aliases != null) {
return aliases;
@@ -52,17 +42,4 @@ public class CommandProps {
return new String[] {};
}
}
-
- public void setAliases(List aliases) {
- this.aliases = aliases;
- }
-
- @Override
- public String toString() {
- return "CommandProps{" +
- "name='" + name + '\'' +
- ", permission='" + permission + '\'' +
- ", aliases=" + aliases +
- '}';
- }
}
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/shared/SectionProps.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/shared/SectionProps.java
index 4a4bd2e..abd6bc1 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/shared/SectionProps.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/settings/props/shared/SectionProps.java
@@ -1,12 +1,14 @@
package com.jaimemartz.playerbalancer.settings.props.shared;
import com.jaimemartz.playerbalancer.connection.ProviderType;
+import lombok.Data;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
import java.util.List;
@ConfigSerializable
+@Data
public class SectionProps {
@Setting
private ProviderType provider;
@@ -22,55 +24,4 @@ public class SectionProps {
@Setting(value = "section-server")
private String serverName;
-
- public ProviderType getProvider() {
- return provider;
- }
-
- public void setProvider(ProviderType provider) {
- this.provider = provider;
- }
-
- public String getParentName() {
- return parentName;
- }
-
- public void setParentName(String parentName) {
- this.parentName = parentName;
- }
-
- public List getServerEntries() {
- return serverEntries;
- }
-
- public void setServerEntries(List serverEntries) {
- this.serverEntries = serverEntries;
- }
-
- public CommandProps getCommandProps() {
- return commandProps;
- }
-
- public void setCommandProps(CommandProps commandProps) {
- this.commandProps = commandProps;
- }
-
- public String getServerName() {
- return serverName;
- }
-
- public void setServerName(String serverName) {
- this.serverName = serverName;
- }
-
- @Override
- public String toString() {
- return "SectionProps{" +
- "provider=" + provider +
- ", parentName='" + parentName + '\'' +
- ", serverEntries=" + serverEntries +
- ", commandProps=" + commandProps +
- ", serverName='" + serverName + '\'' +
- '}';
- }
}
diff --git a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/utils/BuildInfo.java b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/utils/BuildInfo.java
index 98cec07..c76d3d8 100644
--- a/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/utils/BuildInfo.java
+++ b/Main Plugin/src/main/java/com/jaimemartz/playerbalancer/utils/BuildInfo.java
@@ -1,7 +1,15 @@
package com.jaimemartz.playerbalancer.utils;
public class BuildInfo {
- public static final String USER_ID = "%%__USER__%%";
- public static final String RESOURCE_ID = "%%__RESOURCE__%%";
- public static final String NONCE_ID = "%%__NONCE__%%";
+ public static String getUserId() {
+ return "%%__USER__%%";
+ }
+
+ public static String getResourceId() {
+ return "%%__RESOURCE__%%";
+ }
+
+ public static String getNonceId() {
+ return "%%__NONCE__%%";
+ }
}