dotfiles/.local/bin/mccmd

15 lines
266 B
Text
Raw Normal View History

2021-02-04 17:44:55 +01:00
#!/bin/bash
cat | while read line
do
if [[ "$line" =~ ^/ ]]
then
2022-08-20 20:23:03 +02:00
echo "mine $line" > /run/minecraft-server.stdin
2023-02-05 23:49:47 +01:00
elif [[ "$line" =~ ^msh ]]
then
echo "$line" > /run/minecraft-server.stdin
2021-02-04 17:44:55 +01:00
else
2022-08-20 20:23:03 +02:00
echo "mine say $line" > /run/minecraft-server.stdin
2021-02-04 17:44:55 +01:00
fi
done