Skript

Skript

743k Downloads

Proper return name for CommandBlock as sender

ShaneBeee opened this issue ยท 5 comments

commented

Suggestion

I would like to suggest giving the command block a proper toString.
Currently when doing something like send "Sender: %sender%, it returns @
In the CommandSender ClassInfo#toString maybe we can check if the command sender is a command block and return "command block" instead of "@"

Why?

More clear/concise visual of who the command sender is.

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.
commented

I don't think this is a bug. Command blocks are labelled as @ when using /say, and if they have a name (name the block in anvil and place it down) then that name is used instead:
image

commented

ooohhhhhhh... things I did not know.

commented

That said, @ is very confusing and obscure, so it might be worth changing specifically the unnamed case to "command block" or something.

commented

That said, @ is very confusing and obscure, so it might be worth changing specifically the unnamed case to "command block" or something.

that's kinda what I was thinking.
When I first saw the "@" I was surprised.
I can only imagine how confusing this is for most Skripters.

commented

The only thing we need to be careful of is if that @ is important anywhere, e.g. if it's from a translation key that a resource pack might be expecting to override.
(Although if we're just printing @ right now then obviously changing it won't break that)