#Getting config from server. (SOLVED)

3 messages · Page 1 of 1 (latest)

muted halo
#

With my mod's commands, I can get the mod's config from the server via CommandDispatcher<ServerCommandSource>. Thus, anything executed within that command is enacted on the server. This includes returning values from the config, modifying the config, etc. I am no expert on it, but it works.

But, outside of using commands, how can I get the server's config?

The config is simple made using Gson. The use case I have for this is modifying via mixin some plugins for other mods that display screens on the client that do not accurately reflect what is configured on the server. I want to get the configuration from the server to be displayed on them, but presently the client's config is what is displayed.

untold marsh
muted halo
#

Well sweet, I got it up and running.

My solution was to send the packet to a joining player via ServerPlayConnectionEvents.JOIN and then just send to all players when the commands are run to modify the config.

Thank you!