RayNieport / mconBot

A bot to interact with your Minecraft server - from Discord!
Other
19 stars 4 forks source link

/list command not working #6

Closed leeann-chu closed 2 years ago

leeann-chu commented 2 years ago

First off, thank you so much for creating this bot! It was exactly what I was looking for to remotely control my mc server. However, although commands like "start, stop, weather clear, and say" all work perfectly... "list" always returns back

image

Even when there are definitely players online.

Do you ever have this problem? When I do the command in the server terminal it works exactly how you'd expect. image

So I'm confused why rcon doesn't see them. I have the repo for my bot set to public if you want to see how I changed your code. here

Extra info: I'm not running this in a docker and I'm running a forge 1.7.10 modded server.

RayNieport commented 2 years ago

Hi! Glad you're enjoying the bot. I'm running a Spigot server and use list pretty frequently. The output looks like this for me:

image

From the server terminal, I get:

image

If you could, please try using a third-party RCON client to test the command and let me know the results. My bot should simply return whatever RCON gets from the server. It could be possible that your specific forge server has a bug when using RCON for this command. I just want to check that possibility before delving into your modified code. Thanks!

leeann-chu commented 2 years ago

Alright, I downloaded this third party RCON client. Here are my results:

image

The first command "say" worked, but you can see how it still insists no one is online. After this test I'm starting to think either a) 1.7.10 had a different \list command output or b) my forge server is intercepting the list command somehow, though I took a look at all the mods and none stick out as ones that add or overwrite vanilla commands. Any thoughts?

I guess the next step would be launch a vanilla 1.7.10 server and then launch a modded 1.7.10 server and see what happens.

RayNieport commented 2 years ago

Looking at the history of the list command: https://minecraft.fandom.com/wiki/Commands/list there does not seem to have been a modification to the command syntax in newer versions.

My best guess is your Forge server is somehow interfering. I would try out a vanilla 1.7.10 server and see what happens.

RayNieport commented 2 years ago

Looks like it works fine in a 1.7.10 vanilla server.

image

image

Forge seems to be slightly broken. I would suggest updating to a slightly newer version if possible. Sorry, this is a little out of my hands unfortunately. Hopefully I helped you narrow down the issue at least.

I would say to take it up with the Forge developers, but they'll probably tell you that 1.7.10 is no longer supported since it's from 2014.

leeann-chu commented 2 years ago

oh I was just in the middle of testing that! Can confirm, vanilla server works for me too. Alright, now to test forge!

leeann-chu commented 2 years ago

Alright 1.7.10 forge works for me too... so it must be a mod on my other server that's doing this. Thanks for all your help, I'm gonna close the issue now cuz it's clearly 100% on my end.

Have a nice day! Thank you.

RayNieport commented 2 years ago

Yeah I just checked standard 1.7.10 Forge as well and it works no problem. Must be a mod you're using.

Hope you get it working! Glad you're enjoying the bot. Let me know if there's anything else I can help with. So cool to see people using my code and modifying to make it their own. Have fun!

leeann-chu commented 2 years ago

Turns out it it's the mod FTBLibrary in the slim case anyone else has this problem and wants to know. I don't really want to remove it cuz it's the core mod that allows chunk claiming/loading for farms.

Funny enough, they were also the first mods I googled to see their list of commands. But \list is not mentioned.

Unfortunately, I think I'm at a dead end. As you said, this is 2014 stuff, so if it works weird in a really niche case that's just how it is. On the bright side, I at least know why it doesn't work now.

RayNieport commented 2 years ago

Good to know. Glad you found the culprit mod so easily. Sorry I couldn't help more, I almost wish that it was an issue with the bot instead of the mod so I could try to help you fix the problem.