Add CustomMobs plugin configuration and update command logic

Introduced a new configuration file for the CustomMobs plugin, specifying its details and commands. Updated the CommandManager to use "custommobs" instead of "fish" and added an alias "cm" for command execution.
This commit is contained in:
Teriuihi 2024-10-18 19:39:07 +02:00
parent 2127933b0a
commit bfb8c122da
2 changed files with 16 additions and 1 deletions

View File

@ -20,7 +20,7 @@ public class CommandManager implements CommandExecutor, TabExecutor {
private final List<SubCommand> subCommands;
public CommandManager(Main main) {
PluginCommand command = main.getCommand("fish");
PluginCommand command = main.getCommand("custommobs");
if (command == null) {
subCommands = null;
log.error("Unable to find transfer command.");
@ -28,6 +28,7 @@ public class CommandManager implements CommandExecutor, TabExecutor {
}
command.setExecutor(this);
command.setTabCompleter(this);
command.setAliases(List.of("cm"));
subCommands = Arrays.asList(
new Spawn(main)

View File

@ -0,0 +1,14 @@
name: CustomMobs
version: '1.0.0'
main: com.alttd.event.Main
description: A plugin to spawn custom mobs
author: Stijn
website: https://alttd.com
api-version: '1.21'
commands:
event:
description: Base command for 121 event
permission: custommobs.use
usage: /custommobs
aliases:
- cm