feature: add commands kick and smite

This commit is contained in:
2025-07-23 17:22:09 -07:00
parent 18c937611f
commit 86a1b23ff2

13
mc
View File

@@ -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')"