Closed ElFrod0 closed 3 years ago
I believe the query protocol supports this. However, you won't just get server plugins in the output, you'll get other information such as online players. You can find example usage here: https://github.com/Dinnerbone/mcstatus#usage
Note: Not all servers have query enabled or even support it.
Edit: Seems I've misunderstood the question, my bad
It supports it. But I just dont know how to use it properly. As you can see in Issue #46 it has to be something with query.software.plugins
After retrieving a status
or query
object, try using dir()
on them (e.g. dir(query)
, dir(query.software)
)
I reread the question; seems like you are asking about mcstatus as a command line tool? Not as a python library? There is very limited configuration for the command line output if any. You'll have to write your own python script that uses mcstatus as an imported library to control what is output.
Thanks for fast response. Yeah.. Im asking about mcstatus as a command-line tool :/ I have literally zero experience with Python.. Looks like I won't be able to get plugins list of other servers then. Unluckily dinnerbone's website is broken. There used to be "Full Status" feature which was able to show everything about the server.
Here's some simple code that will list out the plugins:
from mcstatus import MinecraftServer
server = MinecraftServer.lookup('address:port')
query_data = server.query()
print('\n'.join(query_data.software.plugins))
Simply replace address:port with the server you want to get the plugins from.
And if you want a website to do this, https://mcsrvstat.us/ is pretty good!
With that sample code provided, please let us know if the issue is addressed.
Closing due to lack of response
Hello,
is there any possible way to have only server plugins in the output? In issue #46 he gets plugins list and their versions. How can I replicate that?
Cheers, Michal