diff --git a/src/main/java/com/github/alathra/AlathranWars/commands/CommandUtil.java b/src/main/java/com/github/alathra/AlathranWars/commands/CommandUtil.java
index fa9669c..804bc11 100644
--- a/src/main/java/com/github/alathra/AlathranWars/commands/CommandUtil.java
+++ b/src/main/java/com/github/alathra/AlathranWars/commands/CommandUtil.java
@@ -1,10 +1,10 @@
package com.github.alathra.AlathranWars.commands;
import com.github.alathra.AlathranWars.AlathranWars;
-import com.github.alathra.AlathranWars.conflict.war.side.Side;
+import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.war.WarController;
-import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
+import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.enums.CommandArgsSiege;
import com.github.alathra.AlathranWars.enums.CommandArgsWar;
import com.github.alathra.AlathranWars.hooks.TownyHook;
@@ -648,7 +648,8 @@ public class CommandUtil {
}
if (AlathranWars.getInstance().getConfig().getInt("minimumPlayTime") > 0) {
//check playtime, if its less than min its true
- if (playTicks < (AlathranWars.getInstance().getConfig().getInt("minimumPlayTime") * (60 * 60 * 20))) out = 2;
+ if (playTicks < (AlathranWars.getInstance().getConfig().getInt("minimumPlayTime") * (60 * 60 * 20)))
+ out = 2;
}
return out;
diff --git a/src/main/java/com/github/alathra/AlathranWars/commands/SiegeCommands.java b/src/main/java/com/github/alathra/AlathranWars/commands/SiegeCommands.java
index 98ab697..0973a6a 100644
--- a/src/main/java/com/github/alathra/AlathranWars/commands/SiegeCommands.java
+++ b/src/main/java/com/github/alathra/AlathranWars/commands/SiegeCommands.java
@@ -1,10 +1,10 @@
package com.github.alathra.AlathranWars.commands;
import com.github.alathra.AlathranWars.AlathranWars;
-import com.github.alathra.AlathranWars.conflict.war.side.Side;
+import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.war.WarController;
-import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
+import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.enums.battle.BattleVictoryReason;
import com.github.alathra.AlathranWars.utility.UtilsChat;
import com.github.milkdrinkers.colorparser.ColorParser;
diff --git a/src/main/java/com/github/alathra/AlathranWars/conflict/battle/Battle.java b/src/main/java/com/github/alathra/AlathranWars/conflict/battle/Battle.java
index 3286211..7599ce0 100644
--- a/src/main/java/com/github/alathra/AlathranWars/conflict/battle/Battle.java
+++ b/src/main/java/com/github/alathra/AlathranWars/conflict/battle/Battle.java
@@ -8,15 +8,20 @@ import java.util.UUID;
public interface Battle {
void start(); // Initiates battle
+
void stop(); // Ends battle
+
void resume(); // Resume battle after server restart or plugin reload
void attackersWin(BattleVictoryReason reason); // A Attacker victory
+
void defendersWin(BattleVictoryReason reason); // A Defender victory
+
void equalWin(BattleVictoryReason reason); // A Draw
UUID uuid = null; // Battle UUID
+
default @NotNull UUID getUUID() {
return uuid;
}
@@ -42,6 +47,7 @@ public interface Battle {
}
BattleType battleType = null;
+
default BattleType getBattleType() {
return battleType;
}
diff --git a/src/main/java/com/github/alathra/AlathranWars/conflict/battle/beam/Laser.java b/src/main/java/com/github/alathra/AlathranWars/conflict/battle/beam/Laser.java
index b5f6ddd..c8a6b85 100644
--- a/src/main/java/com/github/alathra/AlathranWars/conflict/battle/beam/Laser.java
+++ b/src/main/java/com/github/alathra/AlathranWars/conflict/battle/beam/Laser.java
@@ -34,7 +34,10 @@ import org.bukkit.scheduler.BukkitRunnable;
import space.arim.morepaperlib.scheduling.ScheduledTask;
import java.time.Duration;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
@@ -164,7 +167,7 @@ public abstract class Laser {
/**
* Gets laser status.
*
- * @return true if the laser is currently running
+ * @return true if the laser is currently running
* (i.e. {@link #start} has been called and the duration is not over)
*/
public boolean isStarted() {
diff --git a/src/main/java/com/github/alathra/AlathranWars/conflict/battle/beam/Packets.java b/src/main/java/com/github/alathra/AlathranWars/conflict/battle/beam/Packets.java
index 71fd964..1ffc300 100644
--- a/src/main/java/com/github/alathra/AlathranWars/conflict/battle/beam/Packets.java
+++ b/src/main/java/com/github/alathra/AlathranWars/conflict/battle/beam/Packets.java
@@ -161,7 +161,7 @@ class Packets {
ColorParser.of("Laser reflection failed to initialize. The utility is disabled. Please ensure your version () is supported.")
.parseMinimessagePlaceholder("version", Bukkit.getServer().getClass().getPackage().getName())
.build()
- , e);
+ , e);
}
}
diff --git a/src/main/java/com/github/alathra/AlathranWars/conflict/battle/raid/Raid.java b/src/main/java/com/github/alathra/AlathranWars/conflict/battle/raid/Raid.java
index c71b164..1b64365 100644
--- a/src/main/java/com/github/alathra/AlathranWars/conflict/battle/raid/Raid.java
+++ b/src/main/java/com/github/alathra/AlathranWars/conflict/battle/raid/Raid.java
@@ -1,9 +1,9 @@
package com.github.alathra.AlathranWars.conflict.battle.raid;
import com.github.alathra.AlathranWars.AlathranWars;
-import com.github.alathra.AlathranWars.conflict.war.side.Side;
-import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.battle.Battle;
+import com.github.alathra.AlathranWars.conflict.war.War;
+import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.enums.CaptureProgressDirection;
import com.github.alathra.AlathranWars.enums.battle.*;
import com.github.alathra.AlathranWars.events.battle.BattleResultEvent;
diff --git a/src/main/java/com/github/alathra/AlathranWars/conflict/battle/siege/Siege.java b/src/main/java/com/github/alathra/AlathranWars/conflict/battle/siege/Siege.java
index a9baa8d..02ca36c 100644
--- a/src/main/java/com/github/alathra/AlathranWars/conflict/battle/siege/Siege.java
+++ b/src/main/java/com/github/alathra/AlathranWars/conflict/battle/siege/Siege.java
@@ -1,9 +1,9 @@
package com.github.alathra.AlathranWars.conflict.battle.siege;
import com.github.alathra.AlathranWars.AlathranWars;
-import com.github.alathra.AlathranWars.conflict.war.side.Side;
-import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.battle.Battle;
+import com.github.alathra.AlathranWars.conflict.war.War;
+import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.db.DatabaseQueries;
import com.github.alathra.AlathranWars.enums.CaptureProgressDirection;
import com.github.alathra.AlathranWars.enums.battle.*;
@@ -25,7 +25,9 @@ import org.jetbrains.annotations.Nullable;
import java.time.Duration;
import java.time.Instant;
-import java.util.*;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.UUID;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -164,6 +166,7 @@ public class Siege implements Battle {
/**
* Stop a battle in favor of the attackers
+ *
* @param reason what triggered the end
*/
public void attackersWin(BattleVictoryReason reason) {
@@ -191,6 +194,7 @@ public class Siege implements Battle {
/**
* Stop a battle in favor of the defenders
+ *
* @param reason what triggered the end
*/
public void defendersWin(BattleVictoryReason reason) {
@@ -206,6 +210,7 @@ public class Siege implements Battle {
/**
* End a battle in favor of no one
+ *
* @param reason what triggered the end
*/
public void equalWin(BattleVictoryReason reason) {
@@ -606,38 +611,38 @@ public class Siege implements Battle {
.filter(p -> p.isConnected() && !attackers.contains(p))
.collect(Collectors.toSet())
.forEach(p -> {
- // TODO Player left battlefield
+ // TODO Player left battlefield
- }
- );
+ }
+ );
// Entering attackers
attackers.stream()
.filter(p -> p.isConnected() && !previousAttackersOnBattlefield.contains(p))
.collect(Collectors.toSet())
.forEach(p -> {
- // TODO Player entered battlefield
+ // TODO Player entered battlefield
- }
- );
+ }
+ );
// Leaving defenders
previousDefendersOnBattlefield.stream()
.filter(p -> p.isConnected() && !defenders.contains(p))
.collect(Collectors.toSet())
.forEach(p -> {
- // TODO Player left battlefield
+ // TODO Player left battlefield
- }
- );
+ }
+ );
// Entering defenders
defenders.stream()
.filter(p -> p.isConnected() && !previousDefendersOnBattlefield.contains(p))
.collect(Collectors.toSet())
.forEach(p -> {
- // TODO Player entered battlefield
- }
- );
+ // TODO Player entered battlefield
+ }
+ );
}
}
diff --git a/src/main/java/com/github/alathra/AlathranWars/conflict/battle/siege/SiegeRunnable.java b/src/main/java/com/github/alathra/AlathranWars/conflict/battle/siege/SiegeRunnable.java
index dd93390..42351df 100644
--- a/src/main/java/com/github/alathra/AlathranWars/conflict/battle/siege/SiegeRunnable.java
+++ b/src/main/java/com/github/alathra/AlathranWars/conflict/battle/siege/SiegeRunnable.java
@@ -3,8 +3,8 @@ package com.github.alathra.AlathranWars.conflict.battle.siege;
import com.github.alathra.AlathranWars.AlathranWars;
import com.github.alathra.AlathranWars.conflict.battle.beam.CrystalLaser;
import com.github.alathra.AlathranWars.conflict.battle.beam.Laser;
-import com.github.alathra.AlathranWars.enums.battle.BattleSide;
import com.github.alathra.AlathranWars.enums.CaptureProgressDirection;
+import com.github.alathra.AlathranWars.enums.battle.BattleSide;
import com.github.alathra.AlathranWars.enums.battle.BattleVictoryReason;
import com.github.alathra.AlathranWars.utility.UtilsChat;
import com.github.milkdrinkers.colorparser.ColorParser;
diff --git a/src/main/java/com/github/alathra/AlathranWars/conflict/war/War.java b/src/main/java/com/github/alathra/AlathranWars/conflict/war/War.java
index 217293b..0985be4 100644
--- a/src/main/java/com/github/alathra/AlathranWars/conflict/war/War.java
+++ b/src/main/java/com/github/alathra/AlathranWars/conflict/war/War.java
@@ -1,6 +1,7 @@
package com.github.alathra.AlathranWars.conflict.war;
-import com.github.alathra.AlathranWars.conflict.*;
+import com.github.alathra.AlathranWars.conflict.Conflict;
+import com.github.alathra.AlathranWars.conflict.Occupation;
import com.github.alathra.AlathranWars.conflict.battle.raid.Raid;
import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
import com.github.alathra.AlathranWars.conflict.war.side.Side;
diff --git a/src/main/java/com/github/alathra/AlathranWars/conflict/war/WarBuilder.java b/src/main/java/com/github/alathra/AlathranWars/conflict/war/WarBuilder.java
index 817f8ff..52e1ac8 100644
--- a/src/main/java/com/github/alathra/AlathranWars/conflict/war/WarBuilder.java
+++ b/src/main/java/com/github/alathra/AlathranWars/conflict/war/WarBuilder.java
@@ -1,9 +1,9 @@
package com.github.alathra.AlathranWars.conflict.war;
-import com.github.alathra.AlathranWars.conflict.war.side.Side;
-import com.github.alathra.AlathranWars.conflict.war.side.SideCreationException;
import com.github.alathra.AlathranWars.conflict.battle.raid.Raid;
import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
+import com.github.alathra.AlathranWars.conflict.war.side.Side;
+import com.github.alathra.AlathranWars.conflict.war.side.SideCreationException;
import com.github.alathra.AlathranWars.enums.ConflictType;
import com.palmergames.bukkit.towny.object.Government;
import com.palmergames.bukkit.towny.object.Nation;
@@ -28,17 +28,18 @@ public class WarBuilder {
private Government aggressor;
private Government victim;
- public WarBuilder() {}
+ public WarBuilder() {
+ }
public War resume() {
if (
uuid == null ||
- name == null ||
- label == null ||
- side1 == null ||
- side2 == null ||
- sieges == null ||
- raids == null
+ name == null ||
+ label == null ||
+ side1 == null ||
+ side2 == null ||
+ sieges == null ||
+ raids == null
) {
throw new IllegalStateException();
}
diff --git a/src/main/java/com/github/alathra/AlathranWars/conflict/war/WarController.java b/src/main/java/com/github/alathra/AlathranWars/conflict/war/WarController.java
index 107191e..39c9d02 100644
--- a/src/main/java/com/github/alathra/AlathranWars/conflict/war/WarController.java
+++ b/src/main/java/com/github/alathra/AlathranWars/conflict/war/WarController.java
@@ -1,8 +1,8 @@
package com.github.alathra.AlathranWars.conflict.war;
-import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.conflict.battle.raid.Raid;
import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
+import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.db.DatabaseQueries;
import com.palmergames.bukkit.towny.object.Nation;
import com.palmergames.bukkit.towny.object.Town;
diff --git a/src/main/java/com/github/alathra/AlathranWars/conflict/war/side/SideBuilder.java b/src/main/java/com/github/alathra/AlathranWars/conflict/war/side/SideBuilder.java
index 9d28dd6..1981c54 100644
--- a/src/main/java/com/github/alathra/AlathranWars/conflict/war/side/SideBuilder.java
+++ b/src/main/java/com/github/alathra/AlathranWars/conflict/war/side/SideBuilder.java
@@ -28,7 +28,8 @@ public class SideBuilder {
private Instant siegeGrace;
private Instant raidGrace;
- public SideBuilder() {}
+ public SideBuilder() {
+ }
public Side rebuild() throws SideCreationException {
// if (warUUID == null || uuid == null || town == null || side == null || team == null || name == null ||
@@ -45,8 +46,8 @@ public class SideBuilder {
if (side == null
) throw new IllegalStateException("Missing state to create Side 1.1");
- if ( team == null || name == null ||
- towns == null || nations == null
+ if (team == null || name == null ||
+ towns == null || nations == null
) throw new IllegalStateException("Missing state to create Side 1");
if (playersIncludingOffline == null ||
diff --git a/src/main/java/com/github/alathra/AlathranWars/db/DatabaseType.java b/src/main/java/com/github/alathra/AlathranWars/db/DatabaseType.java
index 5bcb089..e6a6600 100644
--- a/src/main/java/com/github/alathra/AlathranWars/db/DatabaseType.java
+++ b/src/main/java/com/github/alathra/AlathranWars/db/DatabaseType.java
@@ -30,23 +30,23 @@ public enum DatabaseType {
* MariaDB database type.
*/
MARIADB("MariaDB", org.mariadb.jdbc.Driver.class.getName(), MariaDbDataSource.class.getName(), "mariadb", '?', '&'),
- ;
+ ;
private final String driverName;
private final String driverClassName;
- private final String dataSourceClassName;
- private final String jdbcPrefix;
- private final char jdbcPropertyPrefix;
- private final char jdbcPropertySeparator;
+ private final String dataSourceClassName;
+ private final String jdbcPrefix;
+ private final char jdbcPropertyPrefix;
+ private final char jdbcPropertySeparator;
- DatabaseType(String driverName, String driverClassName, String dataSourceClassName, String jdbcPrefix, char jdbcPropertyPrefix, char jdbcPropertySeparator) {
- this.driverName = driverName;
- this.driverClassName = driverClassName;
- this.dataSourceClassName = dataSourceClassName;
+ DatabaseType(String driverName, String driverClassName, String dataSourceClassName, String jdbcPrefix, char jdbcPropertyPrefix, char jdbcPropertySeparator) {
+ this.driverName = driverName;
+ this.driverClassName = driverClassName;
+ this.dataSourceClassName = dataSourceClassName;
this.jdbcPrefix = jdbcPrefix;
- this.jdbcPropertyPrefix = jdbcPropertyPrefix;
- this.jdbcPropertySeparator = jdbcPropertySeparator;
- }
+ this.jdbcPropertyPrefix = jdbcPropertyPrefix;
+ this.jdbcPropertySeparator = jdbcPropertySeparator;
+ }
/**
* Gets driver name.
@@ -109,14 +109,14 @@ public enum DatabaseType {
* @return the string
*/
public String formatJdbcConnectionProperties(Map properties) {
- if (properties.isEmpty()) return "";
+ if (properties.isEmpty()) return "";
List connectionProperties = properties.entrySet().stream()
.map(map -> "%s=%s".formatted(map.getKey(), map.getValue()))
.toList();
- return jdbcPropertyPrefix + String.join(Character.toString(jdbcPropertySeparator), connectionProperties);
- }
+ return jdbcPropertyPrefix + String.join(Character.toString(jdbcPropertySeparator), connectionProperties);
+ }
/**
@@ -130,7 +130,8 @@ public enum DatabaseType {
for (DatabaseType type : DatabaseType.values()) {
if (type.equals(prefix.toLowerCase())) {
return type;
- };
+ }
+ ;
}
return null;
diff --git a/src/main/java/com/github/alathra/AlathranWars/db/jooq/JooqContext.java b/src/main/java/com/github/alathra/AlathranWars/db/jooq/JooqContext.java
index 380a4ef..61bb1f6 100644
--- a/src/main/java/com/github/alathra/AlathranWars/db/jooq/JooqContext.java
+++ b/src/main/java/com/github/alathra/AlathranWars/db/jooq/JooqContext.java
@@ -14,24 +14,24 @@ import java.util.regex.Pattern;
* Utility class for getting jOOQ Context to use with HikariCP.
*/
public final class JooqContext {
- static {
- JooqLogger.globalThreshold(Log.Level.ERROR); // Silence JOOQ warnings
- }
+ static {
+ JooqLogger.globalThreshold(Log.Level.ERROR); // Silence JOOQ warnings
+ }
- private static final String TABLE_PREFIX = Cfg.get().getOrDefault("db.prefix", "example_"); // The table prefix as grabbed from config
- private static final Pattern MATCH_ALL_EXCEPT_INFORMATION_SCHEMA = Pattern.compile("^(?!INFORMATION_SCHEMA)(.*?)$");
- private static final Pattern MATCH_ALL = Pattern.compile("^(.*?)$");
- private static final String REPLACEMENT = "%s$0".formatted(TABLE_PREFIX); //
- private final SQLDialect dialect;
+ private static final String TABLE_PREFIX = Cfg.get().getOrDefault("db.prefix", "example_"); // The table prefix as grabbed from config
+ private static final Pattern MATCH_ALL_EXCEPT_INFORMATION_SCHEMA = Pattern.compile("^(?!INFORMATION_SCHEMA)(.*?)$");
+ private static final Pattern MATCH_ALL = Pattern.compile("^(.*?)$");
+ private static final String REPLACEMENT = "%s$0".formatted(TABLE_PREFIX); //
+ private final SQLDialect dialect;
/**
* Instantiates a new Jooq context.
*
- * @param dialect the getSQLDialect
+ * @param dialect the getSQLDialect
*/
public JooqContext(SQLDialect dialect) {
- this.dialect = dialect;
- }
+ this.dialect = dialect;
+ }
/**
* Create DSL Context.
@@ -40,53 +40,54 @@ public final class JooqContext {
* @return the dsl context
*/
public DSLContext createContext(Connection connection) {
- record SimpleConnectionProvider(Connection connection) implements ConnectionProvider {
+ record SimpleConnectionProvider(Connection connection) implements ConnectionProvider {
- @Override
- public Connection acquire() throws DataAccessException {
- return connection;
- }
+ @Override
+ public Connection acquire() throws DataAccessException {
+ return connection;
+ }
- @Override
- public void release(Connection connection) throws DataAccessException {}
- }
- return createWith(new SimpleConnectionProvider(connection));
- }
+ @Override
+ public void release(Connection connection) throws DataAccessException {
+ }
+ }
+ return createWith(new SimpleConnectionProvider(connection));
+ }
- /**
+ /**
* Applies default configuration
*
* @param connectionProvider A connection lifecycle handler API.
* @return DSLContext
*/
- private DSLContext createWith(ConnectionProvider connectionProvider) {
- return new DefaultConfiguration()
- .set(connectionProvider)
- .set(dialect)
- .set(createSettings())
- .set(new ExecuteListenerProvider[0])
- .dsl();
- }
+ private DSLContext createWith(ConnectionProvider connectionProvider) {
+ return new DefaultConfiguration()
+ .set(connectionProvider)
+ .set(dialect)
+ .set(createSettings())
+ .set(new ExecuteListenerProvider[0])
+ .dsl();
+ }
/**
* Returns base settings for DSL Contexts.
*
* @return Settings
*/
- private Settings createSettings() {
- return new Settings()
- .withBackslashEscaping(BackslashEscaping.OFF)
- .withRenderSchema(false)
- .withRenderMapping(new RenderMapping() // Support the tables having custom prefix
- .withSchemata(new MappedSchema()
- .withInputExpression(MATCH_ALL_EXCEPT_INFORMATION_SCHEMA)
- .withTables(new MappedTable()
- .withInputExpression(MATCH_ALL)
- .withOutput(REPLACEMENT)
- )
- )
- )
+ private Settings createSettings() {
+ return new Settings()
+ .withBackslashEscaping(BackslashEscaping.OFF)
+ .withRenderSchema(false)
+ .withRenderMapping(new RenderMapping() // Support the tables having custom prefix
+ .withSchemata(new MappedSchema()
+ .withInputExpression(MATCH_ALL_EXCEPT_INFORMATION_SCHEMA)
+ .withTables(new MappedTable()
+ .withInputExpression(MATCH_ALL)
+ .withOutput(REPLACEMENT)
+ )
+ )
+ )
.withRenderQuotedNames(RenderQuotedNames.ALWAYS)
.withRenderNameCase(RenderNameCase.LOWER);
- }
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/github/alathra/AlathranWars/events/battle/BattleResultEvent.java b/src/main/java/com/github/alathra/AlathranWars/events/battle/BattleResultEvent.java
index 37e23fc..2157538 100644
--- a/src/main/java/com/github/alathra/AlathranWars/events/battle/BattleResultEvent.java
+++ b/src/main/java/com/github/alathra/AlathranWars/events/battle/BattleResultEvent.java
@@ -1,7 +1,7 @@
package com.github.alathra.AlathranWars.events.battle;
-import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.battle.Battle;
+import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.enums.battle.BattleVictor;
import com.github.alathra.AlathranWars.enums.battle.BattleVictoryReason;
import org.bukkit.event.Event;
diff --git a/src/main/java/com/github/alathra/AlathranWars/events/battle/BattleStartEvent.java b/src/main/java/com/github/alathra/AlathranWars/events/battle/BattleStartEvent.java
index ac7794b..ac4e51c 100644
--- a/src/main/java/com/github/alathra/AlathranWars/events/battle/BattleStartEvent.java
+++ b/src/main/java/com/github/alathra/AlathranWars/events/battle/BattleStartEvent.java
@@ -1,7 +1,7 @@
package com.github.alathra.AlathranWars.events.battle;
-import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.battle.Battle;
+import com.github.alathra.AlathranWars.conflict.war.War;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
diff --git a/src/main/java/com/github/alathra/AlathranWars/events/battle/PreBattleResultEvent.java b/src/main/java/com/github/alathra/AlathranWars/events/battle/PreBattleResultEvent.java
index b0997d5..1921595 100644
--- a/src/main/java/com/github/alathra/AlathranWars/events/battle/PreBattleResultEvent.java
+++ b/src/main/java/com/github/alathra/AlathranWars/events/battle/PreBattleResultEvent.java
@@ -1,7 +1,7 @@
package com.github.alathra.AlathranWars.events.battle;
-import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.battle.Battle;
+import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.enums.battle.BattleType;
import com.github.alathra.AlathranWars.enums.battle.BattleVictor;
import com.github.alathra.AlathranWars.enums.battle.BattleVictoryReason;
diff --git a/src/main/java/com/github/alathra/AlathranWars/events/battle/PreBattleStartEvent.java b/src/main/java/com/github/alathra/AlathranWars/events/battle/PreBattleStartEvent.java
index 8c74159..5d325ec 100644
--- a/src/main/java/com/github/alathra/AlathranWars/events/battle/PreBattleStartEvent.java
+++ b/src/main/java/com/github/alathra/AlathranWars/events/battle/PreBattleStartEvent.java
@@ -1,7 +1,7 @@
package com.github.alathra.AlathranWars.events.battle;
-import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.battle.Battle;
+import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.enums.battle.BattleType;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
diff --git a/src/main/java/com/github/alathra/AlathranWars/listeners/CommandsListener.java b/src/main/java/com/github/alathra/AlathranWars/listeners/CommandsListener.java
index 821b08e..c1e0406 100644
--- a/src/main/java/com/github/alathra/AlathranWars/listeners/CommandsListener.java
+++ b/src/main/java/com/github/alathra/AlathranWars/listeners/CommandsListener.java
@@ -1,7 +1,7 @@
package com.github.alathra.AlathranWars.listeners;
-import com.github.alathra.AlathranWars.conflict.war.WarController;
import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
+import com.github.alathra.AlathranWars.conflict.war.WarController;
import com.github.alathra.AlathranWars.utility.Utils;
import com.github.alathra.AlathranWars.utility.UtilsChat;
import com.github.milkdrinkers.colorparser.ColorParser;
diff --git a/src/main/java/com/github/alathra/AlathranWars/listeners/items/PlayerInteractListener.java b/src/main/java/com/github/alathra/AlathranWars/listeners/items/PlayerInteractListener.java
index 4b52ebb..c8429ef 100644
--- a/src/main/java/com/github/alathra/AlathranWars/listeners/items/PlayerInteractListener.java
+++ b/src/main/java/com/github/alathra/AlathranWars/listeners/items/PlayerInteractListener.java
@@ -1,8 +1,8 @@
package com.github.alathra.AlathranWars.listeners.items;
import com.github.alathra.AlathranWars.AlathranWars;
-import com.github.alathra.AlathranWars.conflict.war.WarController;
import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
+import com.github.alathra.AlathranWars.conflict.war.WarController;
import com.github.alathra.AlathranWars.items.WarItemRegistry;
import com.github.alathra.AlathranWars.utility.UtilsChat;
import com.github.milkdrinkers.colorparser.ColorParser;
diff --git a/src/main/java/com/github/alathra/AlathranWars/listeners/siege/PlayerJoinListener.java b/src/main/java/com/github/alathra/AlathranWars/listeners/siege/PlayerJoinListener.java
index ed2f7a7..0ba6142 100644
--- a/src/main/java/com/github/alathra/AlathranWars/listeners/siege/PlayerJoinListener.java
+++ b/src/main/java/com/github/alathra/AlathranWars/listeners/siege/PlayerJoinListener.java
@@ -1,7 +1,7 @@
package com.github.alathra.AlathranWars.listeners.siege;
-import com.github.alathra.AlathranWars.conflict.war.WarController;
import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
+import com.github.alathra.AlathranWars.conflict.war.WarController;
import com.github.alathra.AlathranWars.enums.battle.BattleSide;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
diff --git a/src/main/java/com/github/alathra/AlathranWars/listeners/siege/PlayerQuitListener.java b/src/main/java/com/github/alathra/AlathranWars/listeners/siege/PlayerQuitListener.java
index 2ebf891..24bda2e 100644
--- a/src/main/java/com/github/alathra/AlathranWars/listeners/siege/PlayerQuitListener.java
+++ b/src/main/java/com/github/alathra/AlathranWars/listeners/siege/PlayerQuitListener.java
@@ -1,7 +1,7 @@
package com.github.alathra.AlathranWars.listeners.siege;
-import com.github.alathra.AlathranWars.conflict.war.WarController;
import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
+import com.github.alathra.AlathranWars.conflict.war.WarController;
import com.github.alathra.AlathranWars.enums.battle.BattleSide;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
diff --git a/src/main/java/com/github/alathra/AlathranWars/listeners/siege/SiegeListener.java b/src/main/java/com/github/alathra/AlathranWars/listeners/siege/SiegeListener.java
index 94cafb3..9993720 100644
--- a/src/main/java/com/github/alathra/AlathranWars/listeners/siege/SiegeListener.java
+++ b/src/main/java/com/github/alathra/AlathranWars/listeners/siege/SiegeListener.java
@@ -1,8 +1,8 @@
package com.github.alathra.AlathranWars.listeners.siege;
-import com.github.alathra.AlathranWars.conflict.war.side.Side;
-import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
+import com.github.alathra.AlathranWars.conflict.war.War;
+import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.enums.battle.BattleType;
import com.github.alathra.AlathranWars.enums.battle.BattleVictoryReason;
import com.github.alathra.AlathranWars.events.battle.BattleResultEvent;
diff --git a/src/main/java/com/github/alathra/AlathranWars/listeners/war/NationListener.java b/src/main/java/com/github/alathra/AlathranWars/listeners/war/NationListener.java
index a9c5092..a6bcf50 100644
--- a/src/main/java/com/github/alathra/AlathranWars/listeners/war/NationListener.java
+++ b/src/main/java/com/github/alathra/AlathranWars/listeners/war/NationListener.java
@@ -1,8 +1,8 @@
package com.github.alathra.AlathranWars.listeners.war;
-import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.war.WarController;
+import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.hooks.NameColorHandler;
import com.palmergames.bukkit.towny.event.NationAddTownEvent;
import com.palmergames.bukkit.towny.event.NationPreRenameEvent;
diff --git a/src/main/java/com/github/alathra/AlathranWars/listeners/war/PlayerJoinListener.java b/src/main/java/com/github/alathra/AlathranWars/listeners/war/PlayerJoinListener.java
index 2e09a05..f5bb252 100644
--- a/src/main/java/com/github/alathra/AlathranWars/listeners/war/PlayerJoinListener.java
+++ b/src/main/java/com/github/alathra/AlathranWars/listeners/war/PlayerJoinListener.java
@@ -1,8 +1,8 @@
package com.github.alathra.AlathranWars.listeners.war;
-import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.war.WarController;
+import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.hooks.NameColorHandler;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
diff --git a/src/main/java/com/github/alathra/AlathranWars/listeners/war/PlayerQuitListener.java b/src/main/java/com/github/alathra/AlathranWars/listeners/war/PlayerQuitListener.java
index d749950..7359011 100644
--- a/src/main/java/com/github/alathra/AlathranWars/listeners/war/PlayerQuitListener.java
+++ b/src/main/java/com/github/alathra/AlathranWars/listeners/war/PlayerQuitListener.java
@@ -1,8 +1,8 @@
package com.github.alathra.AlathranWars.listeners.war;
-import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.war.WarController;
+import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.hooks.NameColorHandler;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
diff --git a/src/main/java/com/github/alathra/AlathranWars/listeners/war/TownListener.java b/src/main/java/com/github/alathra/AlathranWars/listeners/war/TownListener.java
index 3b04d41..606f10b 100644
--- a/src/main/java/com/github/alathra/AlathranWars/listeners/war/TownListener.java
+++ b/src/main/java/com/github/alathra/AlathranWars/listeners/war/TownListener.java
@@ -1,8 +1,8 @@
package com.github.alathra.AlathranWars.listeners.war;
-import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.conflict.war.War;
import com.github.alathra.AlathranWars.conflict.war.WarController;
+import com.github.alathra.AlathranWars.conflict.war.side.Side;
import com.github.alathra.AlathranWars.hooks.NameColorHandler;
import com.github.milkdrinkers.colorparser.ColorParser;
import com.palmergames.bukkit.towny.event.TownAddResidentEvent;
diff --git a/src/main/java/com/github/alathra/AlathranWars/utility/Utils.java b/src/main/java/com/github/alathra/AlathranWars/utility/Utils.java
index 260ed2a..5545b25 100644
--- a/src/main/java/com/github/alathra/AlathranWars/utility/Utils.java
+++ b/src/main/java/com/github/alathra/AlathranWars/utility/Utils.java
@@ -1,7 +1,7 @@
package com.github.alathra.AlathranWars.utility;
-import com.github.alathra.AlathranWars.conflict.war.WarController;
import com.github.alathra.AlathranWars.conflict.battle.siege.Siege;
+import com.github.alathra.AlathranWars.conflict.war.WarController;
import com.palmergames.bukkit.towny.object.WorldCoord;
import org.bukkit.Location;
import org.bukkit.Material;