mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-02 14:38:56 +00:00
War side checks
This commit is contained in:
1 parent
9c62de50a9
commit
26cd6d04f8
2 files changed
+28
-2
No files matched your search
@@ -90,6 +90,16 @@ public class WarCommands implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Side checks
|
||||
int side = war.getSide(args[2]);
|
||||
if (side == -1) {
|
||||
p.sendMessage(Helper.Chatlabel() + "You've surrendered!");
|
||||
return true;
|
||||
} else if (war.getSide(args[2]) > 0) {
|
||||
p.sendMessage(Helper.Chatlabel() + "You're already in this war!");
|
||||
return true;
|
||||
}
|
||||
|
||||
// Side check
|
||||
if (!war.getSide1().equalsIgnoreCase(args[2]) && !war.getSide2().equalsIgnoreCase(args[2])) {
|
||||
p.sendMessage(Helper.Chatlabel()
|
||||
|
||||
Reference in new issue
Block a user