MinecraftServerControl / mscs

Powerful command-line control for UNIX and Linux powered Minecraft servers
https://minecraftservercontrol.github.io
BSD 2-Clause "Simplified" License
485 stars 62 forks source link

Feature Request - List Ports #241

Closed shawnbyday closed 4 years ago

shawnbyday commented 4 years ago

Can you add a command that lists out all ports currently in use by mscs? Whether the world is running or not or enabled or not?

sandain commented 4 years ago

Try using the mscs ls command:

$ mscs ls
  alpha: 25567
  beta: 25568
  down: 25571
  lobby:
  over: 25590
  up: 25570
  world: 25566
  gamma: 25569 (disabled)
sandain commented 4 years ago

Is this what you needed @shawnbyday? We could add code to output the data in a different manner if you need (e.g., json). Note that my BungeeCord server does not report that it is using a port even though it is (25565 in this case), but all of the Vanilla Minecraft and Spigot servers report their ports.

shawnbyday commented 4 years ago

@sandain this is exactly what I needed. Maybe I misread the documentation but if I didn't and this information on what you get with ls isn't there maybe just add it to the docs and call it a day?

zanix commented 4 years ago

It's on the docs site but doesn't specify what the output is https://minecraftservercontrol.github.io/docs/mscs/command-reference

ls <option>
  Display a list of worlds.
  Options:
    enabled   Display a list of enabled worlds, default.
    disabled  Display a list of disabled worlds.
    running   Display a list of running worlds.
    stopped   Display a list of stopped worlds.
  If no option, all available worlds are listed.
zanix commented 4 years ago

Maybe someone could add some example output for each command? The documentation repository is here https://github.com/MinecraftServerControl/MinecraftServerControl.github.io

Roflicide commented 4 years ago

I added a section on the getting started section of the documentation called listing worlds. I also added a section on enabling/disabling worlds because I realized we haven't explicitly said what those commands do. Maybe I'll also update the command reference later with something brief that describes those commands.

@shawnbyday Please let me know if the sections I added answers your questions. If you have any other questions or want something clarified, we'd be happy to help. Thanks!

shawnbyday commented 4 years ago

@Roflicide looks good to me, thanks! :)