mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-03 14:38:56 +00:00
console siege create fix
This commit is contained in:
1 parent
4428d18a82
commit
39dd212a30
1 file changed
+8
-9
@@ -328,19 +328,18 @@ public class AdminCommands implements CommandExecutor {
|
|||||||
} else if (args[1].equalsIgnoreCase("siege")) {
|
} else if (args[1].equalsIgnoreCase("siege")) {
|
||||||
//this exists to force a seige with a new owner
|
//this exists to force a seige with a new owner
|
||||||
if (args.length >= 4) {
|
if (args.length >= 4) {
|
||||||
String[] adjusted = new String[]{
|
List<String> l = new ArrayList<>();
|
||||||
"start",
|
l.add("start");
|
||||||
args[2],
|
l.add(args[2]);
|
||||||
args[3],
|
l.add(args[3]);
|
||||||
args[4],
|
if(args.length >= 5) l.add(args[4]);
|
||||||
args[5]
|
if(args.length >= 6) l.add(args[5]);
|
||||||
};
|
SiegeCommands.siegeStart(p, l.toArray(new String[]{}), true);
|
||||||
SiegeCommands.siegeStart(p, adjusted, true);
|
|
||||||
// p.sendMessage(Helper.Chatlabel() + "Try again later!");
|
// p.sendMessage(Helper.Chatlabel() + "Try again later!");
|
||||||
p.sendMessage(Helper.color("&cForcefully started siege from the console."));
|
p.sendMessage(Helper.color("&cForcefully started siege from the console."));
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
p.sendMessage(Helper.color("&cUsage: /alathrawaradmin create siege [war] [town] (owner)"));
|
p.sendMessage(Helper.color("&cUsage: /alathrawaradmin create siege [war] [town] (owner) (force)"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (args[1].equalsIgnoreCase("war")) {
|
} else if (args[1].equalsIgnoreCase("war")) {
|
||||||
|
|||||||
Reference in new issue
Block a user