mark2devel / mark2

Minecraft Multi Server Wrapper Written in Python with Twisted; Pull Requests HIGHLY Encouraged, Collaborators Needed Discord: https://discord.gg/zymJygHNpv
Other
208 stars 44 forks source link

Velocity proxy sample configuration #163

Closed synrg closed 2 years ago

synrg commented 2 years ago

I have started playing with Velocity, a more modern, secure, featureful BungeeCord proxy replacement. I think mark2 should include a sample configuration. I include my mark2.properties so far below to kick off the discussion. I'm sure it can be improved upon.

# based on samples/bungeecord/mark2.properties and https://velocitypowered.com/wiki/users/getting-started/
mark2.jar-path=velocity*.jar
mark2.service.process.done-pattern=Done \(.*\)\!
mark2.service.process.stop-cmd=end\n
mark2.regex.join=\\[connected player\\] (?P<username>[A-Za-z0-9_]{1,16}) \\(\\/(?P<ip>.+)\\) has connected
mark2.regex.quit=\\[connected player\\] (?P<username>[A-Za-z0-9_]{1,16}).* has disconnected(: )?(?P<reason>.*)
java.cli_prepend=-XX:+UnlockExperimentalVMOptions
java.cli.X.ms=512M
java.cli.X.mx=512M
java.cli.XX.UseG1GC=true
java.cli.XX.ParallelRefProcEnabled=true
java.cli.XX.AlwaysPreTouch=true
java.cli.XX.G1HeapRegionSize=4M
plugin.monitor.crash-unknown-cmd-message=.*command.*does not exist.*
# requires Velocity Utils plugin: https://forums.velocitypowered.com/t/velocity-utils-useful-commands-like-send-and-find/825
plugin.shutdown.alert-command=alert %s
plugin.backup.enabled=false
plugin.save.enabled=false
plugin.trigger.enabled=false
synrg commented 2 years ago

FYI, there is no built in "alert" command for Velocity, so plugin.shutdown.alert-command=alert %s does nothing and should probably be removed. https://velocitypowered.com/wiki/users/built-in-commands/

I'm investigating whether whatever this is supposed to accomplish (warn people in advance of a scheduled shutdown, I assume?) can be done with a Velocity plugin.

edit: I installed Velocity Utils and tested with ~stop 1m. I have updated the config in my original post to indicate that plugin should be installed to support shutdown alert command setting.

Column01 commented 2 years ago

Generally the JVM args would not be included in the sample. As for alerts, it's probably not needed as you generally don't restart your proxy often and when you do, alerting the proxy server doesn't do much since it doesn't always go to the other servers, I think it was just there to show how you can do that with mark2. I'd encourage making a pull request instead of an issue 😉