Hotfix AbstractSWCommand
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-06-16 22:16:13 +02:00
Ursprung b183ce0b2d
Commit ef49888699

Datei anzeigen

@ -45,7 +45,12 @@ public abstract class AbstractSWCommand<T> {
} }
protected AbstractSWCommand(Class<T> clazz, String command, String... aliases) { protected AbstractSWCommand(Class<T> clazz, String command, String... aliases) {
this(clazz, command, () -> {}, aliases);
}
protected AbstractSWCommand(Class<T> clazz, String command, Runnable initializer, String... aliases) {
this.clazz = clazz; this.clazz = clazz;
initializer.run();
createAndSafeCommand(command, aliases); createAndSafeCommand(command, aliases);
unregister(); unregister();
register(); register();