PaperMC / Velocity

The modern, next-generation Minecraft server proxy.
https://papermc.io/software/velocity
GNU General Public License v3.0
1.69k stars 594 forks source link

When `forced-hosts` section in config is gone, errors appear #1375

Open svaningelgem opened 2 weeks ago

svaningelgem commented 2 weeks ago

Expected Behavior

The server should start.

Actual Behavior

The server crashes with this error:

[10:30:15 ERROR]: Server 'factions' for forced host 'factions.example.com' does not exist
[10:30:15 ERROR]: Server 'minigames' for forced host 'minigames.example.com' does not exist
[10:30:15 ERROR]: Your configuration is invalid. Velocity will not start up until the errors are resolved.

Steps to Reproduce

Just remove that section. If it matters, my servers section was:

[servers]
    lobby = "1.2.3.4:25576"
    try = ["lobby"]

Plugin List

None

Velocity Version

3.3.0

Additional Information

No response

Nacioszeczek commented 2 weeks ago

While I do think this should be fixed, in the meantime you can just put forced-hosts = {} in your config.

svaningelgem commented 2 weeks ago

That's what I basically did 😉.

But I thought it shouldn't happen like this, so I reported this as a bug. There is still some hardcoded stuff in velocity that shouldn't be there imho.

Low prio bug

electronicboy commented 2 weeks ago

the specific outcome here isn't a bug, the bug is that the default values are not written back to the disk. Pretty much anything in existence, if you remove the configuration options for, will use the default ones

svaningelgem commented 2 weeks ago

imho, the question should be: should velocity force factions/minigames/lobby default on all their users? Shouldn't the "servers" keys be in the forced hosts only?

electronicboy commented 2 weeks ago

That's a bad question, because velocity is not forcing them on you, you are more than welcome to remove them, but, like anything, a default configuration file exists to showcase how to configure the software without requiring that you create the file by hand.

You are more than welcome to remove the entries in that section, deleting the section itself however will use the defaults