Hotfix versionselector() remove default
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
3aa3776c59
Commit
60ed5da260
@ -50,12 +50,11 @@ public class BauCommand extends SWCommand {
|
|||||||
versionSelector(version,
|
versionSelector(version,
|
||||||
() -> new ServerStarter().build12(p.getUniqueId()).send(p).start(),
|
() -> new ServerStarter().build12(p.getUniqueId()).send(p).start(),
|
||||||
() -> new ServerStarter().build15(p.getUniqueId()).send(p).start(),
|
() -> new ServerStarter().build15(p.getUniqueId()).send(p).start(),
|
||||||
() -> new ServerStarter().build19(p.getUniqueId()).send(p).start(),
|
() -> new ServerStarter().build19(p.getUniqueId()).send(p).start()
|
||||||
() -> HelpCommand.sendBauHelp(ChatSender.of(p))
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
switch (version) {
|
||||||
case 12:
|
case 12:
|
||||||
r12.run();
|
r12.run();
|
||||||
@ -66,9 +65,6 @@ public class BauCommand extends SWCommand {
|
|||||||
case 19:
|
case 19:
|
||||||
r19.run();
|
r19.run();
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
rDefault.run();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,8 +148,7 @@ public class BauCommand extends SWCommand {
|
|||||||
versionSelector(version,
|
versionSelector(version,
|
||||||
() -> new ServerStarter().build12(worldOwner.getUuid()).send(p).start(),
|
() -> new ServerStarter().build12(worldOwner.getUuid()).send(p).start(),
|
||||||
() -> new ServerStarter().build15(worldOwner.getUuid()).send(p).start(),
|
() -> new ServerStarter().build15(worldOwner.getUuid()).send(p).start(),
|
||||||
() -> new ServerStarter().build19(worldOwner.getUuid()).send(p).start(),
|
() -> new ServerStarter().build19(worldOwner.getUuid()).send(p).start()
|
||||||
() -> HelpCommand.sendBauHelp(ChatSender.of(p))
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,8 +248,7 @@ public class BauCommand extends SWCommand {
|
|||||||
versionSelector(version,
|
versionSelector(version,
|
||||||
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS12_PATH + p.getUniqueId().toString())),
|
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS12_PATH + p.getUniqueId().toString())),
|
||||||
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS15_PATH + user.getId())),
|
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS15_PATH + user.getId())),
|
||||||
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS19_PATH + user.getId())),
|
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS19_PATH + user.getId()))
|
||||||
() -> HelpCommand.sendBauHelp(ChatSender.of(p))
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ public class SWCommand extends AbstractSWCommand<CommandSender> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(help = true)
|
@Register(help = true)
|
||||||
private void internalHelp(ProxiedPlayer p, String... args) {
|
public void internalHelp(ProxiedPlayer p, String... args) {
|
||||||
ChatSender chatSender = ChatSender.of(p);
|
ChatSender chatSender = ChatSender.of(p);
|
||||||
try {
|
try {
|
||||||
chatSender.prefixless("COMMAND_HELP_HEAD", command.getName());
|
chatSender.prefixless("COMMAND_HELP_HEAD", command.getName());
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren