Class RegisterConfigurationTasksEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.network.event.RegisterConfigurationTasksEvent
- All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent
public class RegisterConfigurationTasksEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.fml.event.IModBusEvent
Fired when the server configuration packet listener collects all the configuration tasks
that should be run on the server to configure the client.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Queue
<ConfigurationTask> private final ServerConfigurationPacketListener
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the configuration tasks that have been registered.Get the server configuration packet listener.void
register
(ConfigurationTask task) Register a configuration task to be run on the server.
-
Field Details
-
listener
-
configurationTasks
-
-
Constructor Details
-
RegisterConfigurationTasksEvent
-
-
Method Details
-
register
Register a configuration task to be run on the server.If you need to send payloads during your task, extend
ICustomConfigurationTask
instead ofConfigurationTask
.- Parameters:
task
- The task to run.
-
getConfigurationTasks
Get the configuration tasks that have been registered.- Returns:
- The configuration tasks.
-
getListener
Get the server configuration packet listener.- Returns:
- The server configuration packet listener.
-