Skip to content

Commit 3f0f843

Browse files
add missing Command type params
1 parent 0195081 commit 3f0f843

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

enigma-cli/src/main/java/org/quiltmc/enigma/command/HelpCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ private HelpCommand() {
1515
@Override
1616
void runImpl(Empty required, Empty optional) throws Exception {
1717
StringBuilder help = new StringBuilder();
18-
Collection<Command> commands = Main.getCommands().values();
18+
Collection<Command<?, ?>> commands = Main.getCommands().values();
1919

2020
help.append("Supported commands:").append("\n");
21-
for (Command command : commands) {
21+
for (Command<?, ?> command : commands) {
2222
help.append("- ").append(command.getName()).append("\n");
2323
help.append("\t").append(command.getDescription()).append("\n");
2424
}

enigma-cli/src/main/java/org/quiltmc/enigma/command/Main.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import static com.google.common.collect.ImmutableMap.toImmutableMap;
1212

1313
public class Main {
14-
private static final ImmutableMap<String, Command> COMMANDS = Stream
14+
private static final ImmutableMap<String, Command<?, ?>> COMMANDS = Stream
1515
.of(
1616
DeobfuscateCommand.INSTANCE,
1717
DecompileCommand.INSTANCE,
@@ -37,7 +37,7 @@ public static void main(String... args) {
3737

3838
String command = args[0].toLowerCase(Locale.ROOT);
3939

40-
Command cmd = COMMANDS.get(command);
40+
Command<?, ?> cmd = COMMANDS.get(command);
4141
if (cmd == null) {
4242
throw new IllegalArgumentException("Command not recognized: " + command);
4343
}
@@ -65,7 +65,7 @@ public static void main(String... args) {
6565
}
6666
}
6767

68-
public static ImmutableMap<String, Command> getCommands() {
68+
public static ImmutableMap<String, Command<?, ?>> getCommands() {
6969
return COMMANDS;
7070
}
7171

@@ -78,7 +78,7 @@ private static void printHelp() {
7878
\tjava -cp enigma.jar org.quiltmc.enigma.command.CommandMain <command> <args>
7979
\twhere <command> is one of:""");
8080

81-
for (Command command : COMMANDS.values()) {
81+
for (Command<?, ?> command : COMMANDS.values()) {
8282
command.appendHelp(help);
8383
}
8484
}

0 commit comments

Comments
 (0)