mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-01 14:38:55 +00:00
Added leader to constructor, removed side.
- Side is automatically detected via war & town.
(cherry picked from commit 53444b81b9)
This commit is contained in:
1 parent
dc21fb981d
commit
ebaf26ebce
1 file changed
+8
-2
@@ -39,7 +39,7 @@ public class Siege {
|
||||
public ArrayList<String> defenderPlayers;
|
||||
public ArrayList<Location> beaconLocs;
|
||||
|
||||
public Siege(final War war, final Town town, final boolean side1AreAttackers) {
|
||||
public Siege(final War war, final Town town, OfflinePlayer siegeLeader) {
|
||||
this.siegeTicks = 0;
|
||||
this.bukkitId = new int[1];
|
||||
this.attackerPlayers = new ArrayList<String>();
|
||||
@@ -47,7 +47,9 @@ public class Siege {
|
||||
this.beaconLocs = new ArrayList<Location>();
|
||||
this.war = war;
|
||||
this.town = town;
|
||||
this.side1AreAttackers = side1AreAttackers;
|
||||
this.siegeLeader = siegeLeader;
|
||||
if (war.getSide(town.getName()) == 2) side1AreAttackers = true;
|
||||
else side1AreAttackers = false;
|
||||
}
|
||||
|
||||
/** Starts a siege */
|
||||
@@ -504,6 +506,10 @@ public class Siege {
|
||||
return siegeTicks;
|
||||
}
|
||||
|
||||
public OfflinePlayer getSiegeLeader() {
|
||||
return siegeLeader;
|
||||
}
|
||||
|
||||
public void save() {
|
||||
SiegeData.saveSiege(this);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user