Velocity icon indicating copy to clipboard operation
Velocity copied to clipboard

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

Open svaningelgem opened this issue 1 year ago • 5 comments

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

svaningelgem avatar Jul 06 '24 08:07 svaningelgem

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

Nacioszeczek avatar Jul 06 '24 09:07 Nacioszeczek

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

svaningelgem avatar Jul 06 '24 09:07 svaningelgem

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

electronicboy avatar Jul 06 '24 09:07 electronicboy

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?

svaningelgem avatar Jul 06 '24 09:07 svaningelgem

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

electronicboy avatar Jul 06 '24 09:07 electronicboy