Interface RegisterChannelEvent
-
- All Superinterfaces:
Event
,LifecycleEvent
public interface RegisterChannelEvent extends LifecycleEvent
Lifecycle event to indicate when network channels should be created and registered.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <C extends Channel>
Cregister(ResourceKey channelKey, java.lang.Class<C> channelType)
Creates and registers a newChannel
for the given channel key and type.-
Methods inherited from interface org.spongepowered.api.event.lifecycle.LifecycleEvent
game
-
-
-
-
Method Detail
-
register
<C extends Channel> C register(ResourceKey channelKey, java.lang.Class<C> channelType) throws DuplicateRegistrationException
Creates and registers a newChannel
for the given channel key and type.- Parameters:
channelKey
- The channel key to register- Returns:
- A new
Channel
instance bound to the channel key - Throws:
DuplicateRegistrationException
- The channel key is already in use or reserved
-
-