mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-04 06:28:51 +00:00
Fix ending
This commit is contained in:
1 parent
889c79e46a
commit
7fb5494885
5 files changed
+32
-2
No files matched your search
@@ -1598,10 +1598,19 @@ public class AdminCommands implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean awa(Player p, String[] args) {
|
private static boolean awa(Player sender, String[] args) {
|
||||||
|
if (args.length > 1) {
|
||||||
|
Player p = Bukkit.getPlayer(args[1]);
|
||||||
|
if (p == null) {
|
||||||
|
sender.sendMessage(Helper.Chatlabel() + Helper.color("&cPlayer not found!"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
p.chat("awa awa! ^.^ UwU");
|
p.chat("awa awa! ^.^ UwU");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
sender.chat("awa awa! ^.^ UwU");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private static boolean fail(Player p, String[] args, String type) {
|
private static boolean fail(Player p, String[] args, String type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|||||||
@@ -391,6 +391,12 @@ public class AdminTabCompletion implements TabCompleter {
|
|||||||
} else {
|
} else {
|
||||||
return NameUtil.filterByStart(type, args[1]);
|
return NameUtil.filterByStart(type, args[1]);
|
||||||
}
|
}
|
||||||
|
} else if (args[0].equalsIgnoreCase("awa")) {
|
||||||
|
if (args.length > 2) {
|
||||||
|
return empty;
|
||||||
|
} else {
|
||||||
|
return NameUtil.filterByStart(CommandHelper.getPlayers(), args[1]);
|
||||||
|
}
|
||||||
} else if (args[0].equalsIgnoreCase("modify")) {
|
} else if (args[0].equalsIgnoreCase("modify")) {
|
||||||
if (args.length > 2) {
|
if (args.length > 2) {
|
||||||
if (args[1].equalsIgnoreCase("raid")) {
|
if (args[1].equalsIgnoreCase("raid")) {
|
||||||
|
|||||||
@@ -44,8 +44,11 @@ public class RaidTabCompletion implements TabCompleter {
|
|||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
if(args.length > 1) {
|
if(args.length > 1) {
|
||||||
switch (args[0]) {
|
switch (args[0]) {
|
||||||
case "abandon", "join", "leave", "start" -> {
|
case "abandon", "join", "leave", "start", "stop" -> {
|
||||||
if (args.length > 2) {
|
if (args.length > 2) {
|
||||||
|
if (args.length > 3) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
return NameUtil.filterByStart(CommandHelper.getTownyWarTowns(args[1]), args[2]);
|
return NameUtil.filterByStart(CommandHelper.getTownyWarTowns(args[1]), args[2]);
|
||||||
} else {
|
} else {
|
||||||
return NameUtil.filterByStart(CommandHelper.getWarNames(), args[1]);
|
return NameUtil.filterByStart(CommandHelper.getWarNames(), args[1]);
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ public class SiegeTabCompletion implements TabCompleter {
|
|||||||
switch (args[0]) {
|
switch (args[0]) {
|
||||||
case "abandon", "start", "stop" -> {
|
case "abandon", "start", "stop" -> {
|
||||||
if (args.length > 2) {
|
if (args.length > 2) {
|
||||||
|
if (args.length > 3) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
return NameUtil.filterByStart(CommandHelper.getTownyWarTowns(args[1]), args[2]);
|
return NameUtil.filterByStart(CommandHelper.getTownyWarTowns(args[1]), args[2]);
|
||||||
} else {
|
} else {
|
||||||
return NameUtil.filterByStart(CommandHelper.getWarNames(), args[1]);
|
return NameUtil.filterByStart(CommandHelper.getWarNames(), args[1]);
|
||||||
|
|||||||
@@ -43,15 +43,24 @@ public class WarTabCompletion implements TabCompleter{
|
|||||||
switch (args[0]) {
|
switch (args[0]) {
|
||||||
case "join" -> {
|
case "join" -> {
|
||||||
if (args.length > 2) {
|
if (args.length > 2) {
|
||||||
|
if (args.length > 3) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
return NameUtil.filterByStart(CommandHelper.getWarSides(args[1]), args[2]);
|
return NameUtil.filterByStart(CommandHelper.getWarSides(args[1]), args[2]);
|
||||||
} else {
|
} else {
|
||||||
return NameUtil.filterByStart(CommandHelper.getWarNames(), args[1]);
|
return NameUtil.filterByStart(CommandHelper.getWarNames(), args[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "info" -> {
|
case "info" -> {
|
||||||
|
if (args.length > 2) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
return NameUtil.filterByStart(CommandHelper.getPlayers(), args[1]);
|
return NameUtil.filterByStart(CommandHelper.getPlayers(), args[1]);
|
||||||
}
|
}
|
||||||
case "delete", "surrender" -> {
|
case "delete", "surrender" -> {
|
||||||
|
if (args.length > 2) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
return NameUtil.filterByStart(CommandHelper.getWarNames(), args[1]);
|
return NameUtil.filterByStart(CommandHelper.getWarNames(), args[1]);
|
||||||
}
|
}
|
||||||
//create, list, help
|
//create, list, help
|
||||||
|
|||||||
Reference in new issue
Block a user