SteamWar/BungeeCore
Archiviert
13
2

Hotfix versionselector() remove default
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-09-19 11:14:22 +02:00
Ursprung 3aa3776c59
Commit 60ed5da260
2 geänderte Dateien mit 5 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -50,12 +50,11 @@ public class BauCommand extends SWCommand {
versionSelector(version,
() -> new ServerStarter().build12(p.getUniqueId()).send(p).start(),
() -> new ServerStarter().build15(p.getUniqueId()).send(p).start(),
() -> new ServerStarter().build19(p.getUniqueId()).send(p).start(),
() -> HelpCommand.sendBauHelp(ChatSender.of(p))
() -> new ServerStarter().build19(p.getUniqueId()).send(p).start()
);
}
public void versionSelector(int version, Runnable r12, Runnable r15, Runnable r19, Runnable rDefault) {
public void versionSelector(int version, Runnable r12, Runnable r15, Runnable r19) {
switch (version) {
case 12:
r12.run();
@ -66,9 +65,6 @@ public class BauCommand extends SWCommand {
case 19:
r19.run();
break;
default:
rDefault.run();
break;
}
}
@ -152,8 +148,7 @@ public class BauCommand extends SWCommand {
versionSelector(version,
() -> new ServerStarter().build12(worldOwner.getUuid()).send(p).start(),
() -> new ServerStarter().build15(worldOwner.getUuid()).send(p).start(),
() -> new ServerStarter().build19(worldOwner.getUuid()).send(p).start(),
() -> HelpCommand.sendBauHelp(ChatSender.of(p))
() -> new ServerStarter().build19(worldOwner.getUuid()).send(p).start()
);
}
@ -253,8 +248,7 @@ public class BauCommand extends SWCommand {
versionSelector(version,
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS12_PATH + p.getUniqueId().toString())),
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS15_PATH + user.getId())),
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS19_PATH + user.getId())),
() -> HelpCommand.sendBauHelp(ChatSender.of(p))
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS19_PATH + user.getId()))
);
}

Datei anzeigen

@ -121,7 +121,7 @@ public class SWCommand extends AbstractSWCommand<CommandSender> {
}
@Register(help = true)
private void internalHelp(ProxiedPlayer p, String... args) {
public void internalHelp(ProxiedPlayer p, String... args) {
ChatSender chatSender = ChatSender.of(p);
try {
chatSender.prefixless("COMMAND_HELP_HEAD", command.getName());