-
-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cuberite executable arguments #1942
Comments
What sort of arguments style should MCServer use? There's already the comms logging arguments which use windows style arguments, but theres an argument to be said for unix style as well. |
I think the unix way is, that every argument have two forms, short and long + instead of = a space... Did I understand you right? |
It's a matter of opinion. You're right, it's possible to write every time with a shell script the data into the settings.ini, to protect the amount of slots buyed by its owner. But the function with arguments would be very sleek and lightweight. |
Both are actually possible. Pure UNIX/POSIX only has "-abc" for combined flags/options and "--option1 arg1 --option2 arg2" for long form options, while there's a GNU extension that also allows "--option1=arg1". https://en.wikipedia.org/wiki/Getopt |
As a GSP we need this too in order to enforce certain parameters such as max slots and Port. Any way to get at least command switches support added for slots, port and bind to IP ? If we had that for windows that would be great allowing us to offer the game, allowing users to get a server at a cheap price without the hassle of managing a VPS and getting the software more popular. |
This disscution is being split between here and the forum http://forum.mc-server.org/showthread.php?tid=1910&page=4 but the other problem with command line options is number. MCServer has approximately 20 settings under the banner of slots, port and bind to IP. And we would need to add more in the future to deal with plugins, along with the possibility that the host might want to control other settings like the deadlock detector. This is unmanageable with command line arguments. What would you think of a second ini file, which could be made read only to the server? |
No GSP will ever use all a game options in command line, only a few ones he dont want to be changed such as the ones I mentionned. Having IP binding implemented would be a great step towards GSP hosting as we all use machines with multiple IP's unlike home hosted servers and I noticed mcserver binds on all interfaces (not only primary IP). Thanks for the follow up and quick reply! |
I actually understand what you're saying more now, and CLI options would be a good idea, at least for the basics. But we should promote the config file more than the options, to avoid confusion of users. |
But what's the basics? Slots I get is simple, but for IP mcservers setup is complicated. We currently have three settings for IP for the main Minecraft protocol to bind to as the user can specify ips that are ipv4 or Ipv6 only. |
Well we could do without IP binding as long as we can specify port (and thus increment ports making sure no user can change the port to avoid conflicts) but that would be for sure a plus to get more GSP's to support the game. |
I'd like to suggest that anything that can be changed in settings.ini also be configurable via command line flags with the following format:
E.g.
|
The idea of being able to set a config setting seems like a good idea, but that syntax would be a pain to implement with our current parser. I'm thinking |
I'm not sure about how to handle quoted strings. |
Some applications handle quoted strings by putting the entire argument in quotes:
Then you split that entire string by the first = and it works the same way as normal. |
Sounds good and feels reasonably doable. |
Is there any traction on this? I want to integrate Cuberite support into AMP/MCMA3 but it's blocked on this change. |
AMP/Cuberite would be great, especially on Pi servers! whatever the implementation details are, lets get this support in there. . . |
I'm going to work on this next week, so it should be coming soon. |
I know I am a random person. I know this is an impressive piece of work. But I know how to help. int ymlslots = "amount from yml"; |
Slots and ports are now completed, that should allow for basic GSP functionality. @PhonicUK are there any other options that you particularly need, otherwise I will add the others slowly. |
those are the main ones |
Any news on expanding this to the rest of the settings? Also IP binding needs to be settable this way. |
This one also helps launching Docker containers using environment variables. |
I've noticed its not possible to start MCServer with certain arguments e.g."MCServer --slots=12 --port=25566".
This would be useful for setting up servers in a webinterface.
The most webinterfaces have variables who defining slots, port, ip etc. like {slots}, {port} and {ip}.
Anyway, so that the terminal can start the Server like "./MCServer --slots={slots} --port={port}" and the specific options in settings.ini will be ignored.
The text was updated successfully, but these errors were encountered: