mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-03 22:15:24 +00:00
surrender check for raid creation
This commit is contained in:
1 parent
7fb5494885
commit
8835c59a2d
1 file changed
+5
@@ -132,6 +132,11 @@ public class RaidCommands implements CommandExecutor {
|
|||||||
|
|
||||||
//check if the town were attempting to raid is in the war
|
//check if the town were attempting to raid is in the war
|
||||||
if(!war.getSide1Towns().contains(raidedTown.getName()) && !war.getSide2Towns().contains(raidedTown.getName())) {
|
if(!war.getSide1Towns().contains(raidedTown.getName()) && !war.getSide2Towns().contains(raidedTown.getName())) {
|
||||||
|
if (war.getSurrenderedTowns().contains(raidedTown.getName())) {
|
||||||
|
if (admin) p.sendMessage(String.valueOf(Helper.Chatlabel()) + "The town you are trying to raid has already surrendered!");
|
||||||
|
raidOwner.sendMessage(String.valueOf(Helper.Chatlabel()) + "The town you are trying to raid has already surrendered!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (admin) p.sendMessage(String.valueOf(Helper.Chatlabel()) + "The town you are trying to raid is not part of the war!");
|
if (admin) p.sendMessage(String.valueOf(Helper.Chatlabel()) + "The town you are trying to raid is not part of the war!");
|
||||||
raidOwner.sendMessage(String.valueOf(Helper.Chatlabel()) + "The town you are trying to raid is not part of the war!");
|
raidOwner.sendMessage(String.valueOf(Helper.Chatlabel()) + "The town you are trying to raid is not part of the war!");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in new issue
Block a user