From 86a1b23ff203cbf39a71e1ccbf861db4ab8fa328 Mon Sep 17 00:00:00 2001 From: ilguappo Date: Wed, 23 Jul 2025 17:22:09 -0700 Subject: [PATCH] feature: add commands kick and smite --- mc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mc b/mc index bb69eda..48e4ce2 100755 --- a/mc +++ b/mc @@ -46,8 +46,21 @@ declare -rA commands=( [connect]='connect FUNC {port} Open a connection to server using docker. Leave arg blank for default 25565.' [check-update]='check_update FUNC {game_version} Check installed mods have available version.' [version]='version FUNC {} Check the version of Minecraft the server is running.' + [kick]='kick FUNC {player} Kick a player.' + [smite]='smite FUNC {player} Smite a player with lightening.' ) + +function smite() { + local player="$1" + call_api console "execute at $player run summon minecraft:lightning_bolt" +} + +function kick() { + local player="$1" + call_api console "kick $player" +} + function version() { local message="$(call_api console version | jq -r '.message')"