You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
357 B
14 lines
357 B
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
public class CommandRegistry11 {
|
|
private final Map<String, Command11> commandMap = new HashMap<>();
|
|
|
|
public void registerCommand(Command11 command) {
|
|
commandMap.put(command.getName(), command);
|
|
}
|
|
|
|
public Command11 getCommand(String name) {
|
|
return commandMap.get(name);
|
|
}
|
|
}
|