Expand spawn command syntax and improve tab completion
Updated the spawn command to require an additional <mob> argument. Enhanced the tab completion functionality to provide context-sensitive suggestions based on the number of arguments.
This commit is contained in:
@@ -28,7 +28,7 @@ public class Messages extends AbstractConfig {
|
||||
|
||||
public static String HELP_MESSAGE_WRAPPER = "<gold>Main help:\n<commands></gold>";
|
||||
public static String HELP_MESSAGE = "<green>Show this menu: <gold>/cm help</gold></green>";
|
||||
public static String SPAWN = "<green>Spawn a mob of a specific type: <gold>/cm spawn <mob_type> [<world> <x> <y> <z>]</gold></green>";
|
||||
public static String SPAWN = "<green>Spawn a mob of a specific type: <gold>/cm spawn <mob_type> <mob> [<world> <x> <y> <z>]</gold></green>";
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static void load() {
|
||||
|
||||
@@ -43,6 +43,10 @@ public class MobTypes extends AbstractConfig {
|
||||
return Optional.of(MOB_TYPES.get(name));
|
||||
}
|
||||
|
||||
public static List<String> getAllMobTypes() {
|
||||
return MobTypes.MOB_TYPES.MOB_TYPES.keySet().stream().toList();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static void load() {
|
||||
MOB_TYPES.clear();
|
||||
|
||||
Reference in New Issue
Block a user