Rewrite commands

Signed-off-by: Jaida Wu <mlgmxyysd@meowcat.org>
This commit is contained in:
Jaida Wu
2022-04-20 20:21:38 +08:00
parent 087cd680bd
commit 63cb0a8174
31 changed files with 1025 additions and 1453 deletions

View File

@@ -0,0 +1,25 @@
package emu.grasscutter.command;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.game.GenshinPlayer;
import java.util.List;
public interface CommandHandler {
/**
* Send a message to the target.
*
* @param player The player to send the message to, or null for the server console.
* @param message The message to send.
*/
static void sendMessage(GenshinPlayer player, String message) {
if (player == null) {
Grasscutter.getLogger().info(message);
} else {
player.dropMessage(message);
}
}
default void onCommand(GenshinPlayer sender, List<String> args) {
}
}