Consolidate CommandManager implementations

A lot of these just implemented the class overrode the `description` method returning nothing.
This commit is contained in:
Camotoy 2022-10-18 16:05:55 -04:00
parent 144d7b000a
commit 730b0beb01
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F
10 changed files with 14 additions and 180 deletions

View file

@ -63,7 +63,7 @@ import java.util.Locale;
import java.util.Map;
@RequiredArgsConstructor
public abstract class GeyserCommandManager {
public class GeyserCommandManager {
@Getter
private final Map<String, Command> commands = new Object2ObjectOpenHashMap<>(12);
@ -198,7 +198,9 @@ public abstract class GeyserCommandManager {
* @param command Command to get the description for
* @return Command description
*/
public abstract String description(String command);
public String description(String command) {
return "";
}
@RequiredArgsConstructor
public static class CommandBuilder<T extends CommandSource> implements Command.Builder<T> {