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
FieldsModifier and TypeFieldDescriptionprivate final Queue
<net.minecraft.server.network.ConfigurationTask> private final net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener
-
Constructor Summary
ConstructorsConstructorDescriptionRegisterConfigurationTasksEvent
(net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener listener) -
Method Summary
Modifier and TypeMethodDescriptionQueue
<net.minecraft.server.network.ConfigurationTask> Get the configuration tasks that have been registered.net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener
Get the server configuration packet listener.void
register
(net.minecraft.server.network.ConfigurationTask task) Register a configuration task to be run on the server.
-
Field Details
-
listener
private final net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener listener -
configurationTasks
-
-
Constructor Details
-
RegisterConfigurationTasksEvent
@Internal public RegisterConfigurationTasksEvent(net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener listener)
-
-
Method Details
-
register
public void register(net.minecraft.server.network.ConfigurationTask task) 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
public net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener getListener()Get the server configuration packet listener.- Returns:
- The server configuration packet listener.
-