Essential Commands

Essential Commands

108k Downloads

Enhancement: /broadcast

jiriks74 opened this issue · 6 comments

commented

Add a command to broadcast messages to all players as if sent from server console.

commented

Ah, I understand, that's fair.

I'd frankly recommend just tossing together a shortcut with Command Aliases for something like this. example, for broadcast:

schemaVersion = 1 # Required | Schema Version
commandMode = "COMMAND_CUSTOM" # Required | Custom Command Format
command = "broadcast" # Required | Parent command name
permission = 4 # Optional | Default: 0 | If LuckPerms is not installed will fallback to these permission level

[[children]] # Optional | List of sub-child commands

child = "message_body"
type = "argument"
argumentType = "minecraft:greedy_string"

[[children.actions]] # Optional | List of actions

command = "tellraw @a {\"text\": \"[Server] {{message_body}}\"}" # Optional | Command to execute will be processed to map variables and process functions
commandType = "SERVER" # Optional | Required if command is present
message = "Broadcasted message." # Optional | Executor gets a local message

output:

broadcast-commandaliases-demo

commented

(that would go in config/commandaliases/broadcast.tomlonce installed)

commented

Works, thanks <3
I still think it would be a great addition though. Feel free to mark this as resolved if you want. Great work btw!

commented

Yeah, I don't entirely disagree. I'll leave this open and rainy-day project it.

commented

Isn't this what /tellraw does?

commented

Isn't this what /tellraw does?

Well, it can do what I want but it requires json syntax. It really isn't suited for quickly sending a server message. The only way to use /tellraw, at least for me, it to use something like this to generate the messages for me.

I think that just quickly sending something with just /broadcast <message> is way easier than /tellraw @a {"text":"<message>"}.