Interface FabricServerConfigurationPacketListenerImpl
- All Known Implementing Classes:
ServerConfigurationPacketListenerImplMixin
public interface FabricServerConfigurationPacketListenerImpl
Fabric-provided extensions for
ServerConfigurationPacketListenerImpl.
This interface is automatically implemented via Mixin and interface injection.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddTask(net.minecraft.server.network.ConfigurationTask task) Enqueues aConfigurationTaskto be processed.default voidcompleteTask(net.minecraft.server.network.ConfigurationTask.Type key) Completes the task identified bykey.
-
Method Details
-
addTask
default void addTask(net.minecraft.server.network.ConfigurationTask task) Enqueues aConfigurationTaskto be processed.Before adding a task use
ServerConfigurationNetworking.canSend(ServerConfigurationPacketListenerImpl, Identifier)to ensure that the client can process this task.Once the client has handled the task a packet should be sent to the server. Upon receiving this packet the server should call
completeTask(ConfigurationTask.Type), otherwise the client cannot join the world.- Parameters:
task- the task
-
completeTask
default void completeTask(net.minecraft.server.network.ConfigurationTask.Type key) Completes the task identified bykey.- Parameters:
key- the task key- Throws:
IllegalStateException- if the current task is notkey
-