maruohon / tellme

Small informational mod for Minecraft
22 stars 10 forks source link

Feature request: print loaded results in chat #12

Closed LemADEC closed 3 years ago

LemADEC commented 6 years ago

As of tellme-1.12.2-0.6.0.jar, from what I can see, the output results for "/tellme loaded xxx" are only available through console. It would really help to have anyone being able to check results without requiring console access. Something along the line of "print". I would recommend to only show top 10 result when printing to player's chat.

maruohon commented 6 years ago

Sure I can look into implementing a print-chat output type or something, although I'll likely do it only for the loaded command to start with.

If the TellMe commands would be player-usable, should there then also be a permission system in place for granting some players the ability to run (only) some of the commands? Currently the top-level /tellme command requires OP level permissions I believe.

LemADEC commented 6 years ago

In my mind, "/tellme loaded" is a server staff only command. I don't remember if other commands would be useful for players. As such, we can already only allow '/tellme' for staff and wouldn't need a separate permission node.

LemADEC commented 6 years ago

the "print" keyword is used in the "/tellme holding" command, so I would suggest to use the same for "/tellme loaded" so it's more consistent.

maruohon commented 6 years ago

Okay... unfortunately all the registry dump commands also use print to mean "print to console". But I guess it's better to not go change any of them at this point anymore.

LemADEC commented 6 years ago

ok, then could we default to current command context then? like if I type '/tellme loaded entity" from console, it writes in console, while from player chat is writes to player's chat?

maruohon commented 6 years ago

In single player, at least I personally, always want it to write to the console however, at least with the current output format. So i would very much want there to still be a way to do that too.

So personally I think I would prefer the output options to be something like dump, console, chat. I might make that a global change, but keep the old print as an (non-tab-completable/deprecated?) alias for the old behaviour, at least for now. Or should I remove it completely to avoid confusion?

LemADEC commented 6 years ago

If it only write in console when a player types a command, there should be a message to that player about it. I think that's already the case here.

console, chat and dump are explicit. print was ambiguous. So it's a good idea to rename it to chat.

Backward compatibility is a good thing. You might want to nag them to use the new format so you can actually remove that backward compatibility later on (i.e. encourage them to upgrade instead of just delaying the pain).

LemADEC commented 6 years ago

You could make an configuration option for the default output style for players.

maruohon commented 3 years ago

The command output stuff was rewritten in the 1.14.4+ versions, there are now always three output options, file, console and chat.

It's unlikely I'll do that change anymore in the 1.12.2 version, as 1.12.2 is kind of slowly getting phased out, and I don't think doing this change in 1.12.2 anymore at this point is a good use of my time. And it would take quite a few hours of staring through all the commands and arguments to change all of that stuff and test everything...