mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-02 22:16:00 +00:00
Bugfixes for Raids
This commit is contained in:
1 parent
8b2958655e
commit
2dbfcdb9df
7 files changed
+28
-30
No files matched your search
@@ -521,8 +521,8 @@ public class AdminCommands implements CommandExecutor {
|
||||
p.sendMessage(Helper.Chatlabel() + "Info dump for raid: " + r.getName());
|
||||
p.sendMessage(Helper.Chatlabel() + "oOo------------===------------oOo");
|
||||
p.sendMessage(Helper.Chatlabel() + "Name: " + r.getName());
|
||||
p.sendMessage(Helper.Chatlabel() + "Raiders: " + r.getRaiders());
|
||||
p.sendMessage(Helper.Chatlabel() + "Defenders: " + r.getDefenders());
|
||||
p.sendMessage(Helper.Chatlabel() + "Raiders: " + r.getRaiderSide());
|
||||
p.sendMessage(Helper.Chatlabel() + "Defenders: " + r.getDefenderSide());
|
||||
p.sendMessage(Helper.Chatlabel() + "Side1Raiders: " + r.getSide1AreRaiders());
|
||||
p.sendMessage(Helper.Chatlabel() + "Raider Score: " + r.getRaiderScore());
|
||||
p.sendMessage(Helper.Chatlabel() + "Defender Score: " + r.getDefenderScore());
|
||||
@@ -568,8 +568,8 @@ public class AdminCommands implements CommandExecutor {
|
||||
p.sendMessage(Helper.Chatlabel() + "Info dump for siege: " + s.getName());
|
||||
p.sendMessage(Helper.Chatlabel() + "oOo------------===------------oOo");
|
||||
p.sendMessage(Helper.Chatlabel() + "Name: " + s.getName());
|
||||
p.sendMessage(Helper.Chatlabel() + "Attackers: " + s.getAttackers());
|
||||
p.sendMessage(Helper.Chatlabel() + "Defenders: " + s.getDefenders());
|
||||
p.sendMessage(Helper.Chatlabel() + "Attackers: " + s.getAttackerSide());
|
||||
p.sendMessage(Helper.Chatlabel() + "Defenders: " + s.getDefenderSide());
|
||||
p.sendMessage(Helper.Chatlabel() + "Attacker points: " + s.getAttackerPoints());
|
||||
p.sendMessage(Helper.Chatlabel() + "Defender points: " + s.getDefenderPoints());
|
||||
p.sendMessage(Helper.Chatlabel() + "War: " + s.getWar().getName());
|
||||
|
||||
@@ -264,7 +264,7 @@ public class RaidCommands implements CommandExecutor {
|
||||
WarData.saveWar(raid2.getWar());
|
||||
|
||||
//broadcast
|
||||
Bukkit.broadcastMessage(String.valueOf(Helper.Chatlabel()) + "As part of " + war.getName() + ", forces from " + raid2.getRaiders() + " are gathering to raid the town of " + raidedTown.getName() + "!");
|
||||
Bukkit.broadcastMessage(String.valueOf(Helper.Chatlabel()) + "As part of " + war.getName() + ", forces from " + raid2.getRaiderSide() + " are gathering to raid the town of " + raidedTown.getName() + "!");
|
||||
Bukkit.broadcastMessage(String.valueOf(Helper.Chatlabel()) + "All players from the defending side have been drafted for the town's defense.");
|
||||
Bukkit.broadcastMessage(Helper.Chatlabel() + "The raid of "
|
||||
+ raidedTown.getName() + " will begin in " + (int) (RaidPhase.TRAVEL.startTick / 20 / 60) + " minutes!");
|
||||
@@ -273,7 +273,7 @@ public class RaidCommands implements CommandExecutor {
|
||||
|
||||
Main.warLogger.log(raidOwner.getName() + " started a raid.");
|
||||
if(admin) Main.warLogger.log(raidOwner.getName() + " started a raid from admin interference.");
|
||||
Main.warLogger.log("As part of " + war.getName() + ", forces from " + raid2.getRaiders() + " are raiding the town of " + raidedTown.getName() + "!");
|
||||
Main.warLogger.log("As part of " + war.getName() + ", forces from " + raid2.getRaiderSide() + " are raiding the town of " + raidedTown.getName() + "!");
|
||||
Main.warLogger.log("The Raiders are gathering at " + gatherTown.getName() + " before making the journey over!");
|
||||
}
|
||||
}
|
||||
@@ -330,7 +330,7 @@ public class RaidCommands implements CommandExecutor {
|
||||
|
||||
if(joiner != null) {
|
||||
if (args[4] != null) {
|
||||
if (args[4].equals(raid.getDefenders())) {
|
||||
if (args[4].equals(raid.getDefenderSide())) {
|
||||
if (!raid.getDefenderPlayers().contains(joiner.getName()))
|
||||
raid.getDefenderPlayers().add(joiner.getName());
|
||||
p.sendMessage(String.valueOf(Helper.Chatlabel()) + "Player " + joiner.getName() + " added to defender side.");
|
||||
@@ -491,7 +491,7 @@ public class RaidCommands implements CommandExecutor {
|
||||
//check if gather phase
|
||||
if (raid.getPhase() == RaidPhase.GATHER || raid.getPhase() == RaidPhase.START || raid.getPhase() == RaidPhase.TRAVEL || raid.getPhase() == RaidPhase.COMBAT) {
|
||||
//force defender victory
|
||||
Bukkit.broadcastMessage(String.valueOf(Helper.Chatlabel()) + "The raid on " + raid.getRaidedTown().getName() + " has been abandoned by " + raid.getRaiders());
|
||||
Bukkit.broadcastMessage(String.valueOf(Helper.Chatlabel()) + "The raid on " + raid.getRaidedTown().getName() + " has been abandoned by " + raid.getRaiderSide());
|
||||
Main.warLogger.log(p.getName() + " abandoned the raid on " + raid.getRaidedTown().getName() + " they started at " + raid.getGatherTown().getName());
|
||||
raid.defendersWin(raid.getRaiderScore(), raid.getDefenderScore());
|
||||
} else {
|
||||
@@ -518,8 +518,8 @@ public class RaidCommands implements CommandExecutor {
|
||||
p.sendMessage("Owner: " + raid.getOwner().getName());
|
||||
p.sendMessage("Raiding: " + raid.getRaidedTown().getName());
|
||||
p.sendMessage("Gathering In: " + raid.getGatherTown().getName());
|
||||
p.sendMessage("Raiders: " + raid.getRaiders());
|
||||
p.sendMessage("Defenders: " + raid.getDefenders());
|
||||
p.sendMessage("Raiders: " + raid.getRaiderSide());
|
||||
p.sendMessage("Defenders: " + raid.getDefenderSide());
|
||||
p.sendMessage("Raider Score: " + raid.getRaiderScore());
|
||||
p.sendMessage("Defender Score: " + raid.getDefenderScore());
|
||||
p.sendMessage("Raid Phase: " + raid.getPhase().name());
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import com.palmergames.bukkit.towny.object.Town;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import java.util.HashSet;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
|
||||
@@ -150,7 +150,7 @@ public class SiegeCommands implements CommandExecutor {
|
||||
SiegeData.addSiege(siege);
|
||||
war.addSiege(siege);
|
||||
|
||||
Bukkit.broadcastMessage(Helper.Chatlabel() + "A siege has been laid on " + siege.getTown() + " by " + siege.getAttackers() + "!");
|
||||
Bukkit.broadcastMessage(Helper.Chatlabel() + "A siege has been laid on " + siege.getTown() + " by " + siege.getAttackerSide() + "!");
|
||||
|
||||
war.save();
|
||||
siege.start();
|
||||
|
||||
Reference in new issue
Block a user