BlueMap

BlueMap

85.1k Downloads

Output from /bluemap does not show up through RCON or in log

ion1 opened this issue ยท 9 comments

commented

What I did / Steps to reproduce

Running the bluemap command in a Minecraft client outputs the result normally:
image

However, running it through RCON outputs nothing:
image

The output does not show up in the server log in either case.

Expected result

I expect to see the output from the bluemap command through RCON and possibly in the server log as well.

Actual result

The output does not show up through RCON or in the server log.

Context

BlueMap Version: BlueMap-3.4-spigot
Platform: PaperMC 1.19.2-210

commented

I thought 3.5 fixed this as I got the expected output, but it turns out it only worked the first time after starting the server. It may or may not have been like that in 3.4 as well.

$ rcon 'bluemap'
BlueMap - Status:
 Render-Threads are running!
 Queued Tasks (3):
  [20df] Update map 'world'
   Detail: Update region (-2, 0) for map 'world'
   Progress: 6.09%
   ETA: 02:04:53
  [2fd5] Update map 'world_nether'
  [6f30] Update map 'world_the_end'

$ rcon 'bluemap'

$ rcon 'bluemap'

commented

There's nothing to apologize for, I just wanted to point out that it seems to respond with the output but only once, in case that helps with debugging. Thanks for your efforts!

commented

Sorry, I haven't looked at this yet .. it's the first next thing on the todo rn, so i'll check this soon :)

commented

If the command-source is not a player, then the command-response is being sent with spigots CommandSender#sendMessage(String) method, here: https://github.com/BlueMap-Minecraft/BlueMap/blob/master/implementations/spigot/src/main/java/de/bluecolored/bluemap/bukkit/BukkitCommandSource.java#L63

So my first thought is that this must be an issue with spigot/paper..

I will test this myself later though, let's await the results from that :)

commented

@ion1 So ...
the good news are, i found the reason why there are no responses to rcon sometimes..
.. The bad news are i won't be able to fix this.

BlueMap processes most commands asynchronously, to not block the server-thread while doing the calculations for the command. This is something i won't change, because some BlueMap commands take a second to read and freezing the server for a second is not acceptable for me.
The problem with RCON is now that the way most ServerAPI's like Spigot/Paper are implementing their command-system, is that .. if the command gets executed asynchronously, Spigot/Paper closes the RCON-connection before bluemap finished executing the command. Which means that bluemap can't send a response.

tl;dr:
To send a response to RCON i'd need to execute the commands on the Server-Thread, which i don't want to and will not do ^^'

commented

Thanks for looking into this! Would it be possible to output the result into the server log so I could see it in there after running the command through RCON?

commented

I'll add that ๐Ÿ‘

commented

Hi, this same issue appears in Fabric 1.18.2 servers (and presumably others) with the server mod version of BlueMap. No response via RCON or in server output/logs.

commented

This is a bigger problem in Fabric or Forge, since there seems to be no easy way (without a Mixin) to detect if the command-source is an RCON source or not.

Logging command-output onto the console/log instead of sending them back is also more a hack than a real solution.
So this issue will be a won't fix and as long as RCON doesn't allow async command-responses it will just not be supported by BlueMap.