Class Netty4PlatformInjector
java.lang.Object
org.geysermc.floodgate.core.inject.Netty4PlatformInjector
- All Implemented Interfaces:
org.geysermc.floodgate.core.api.inject.PlatformInjector<io.netty.channel.Channel>
public abstract class Netty4PlatformInjector
extends Object
implements org.geysermc.floodgate.core.api.inject.PlatformInjector<io.netty.channel.Channel>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAddon(org.geysermc.floodgate.core.api.inject.InjectorAddon<io.netty.channel.Channel> addon) protected voidaddInjectedClient(io.netty.channel.Channel channel) voidchannelClosedCall(io.netty.channel.Channel channel) Method to loop through all the addons and callInjectorAddon.onChannelClosed(Object)ifInjectorAddon.shouldInject()voidinjectAddonsCall(io.netty.channel.Channel channel, boolean proxyToServer) Method to loop through all the addons and callInjectorAddon.onInject(Object, boolean)ifInjectorAddon.shouldInject().Set<io.netty.channel.Channel>void<T extends org.geysermc.floodgate.core.api.inject.InjectorAddon<io.netty.channel.Channel>>
TremoveAddon(Class<T> addon) voidremoveAddonsCall(io.netty.channel.Channel channel) Method to loop through all the addons and callInjectorAddon.onRemoveInject(Object)ifInjectorAddon.shouldInject().voidremoveInjectedClient(io.netty.channel.Channel channel) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.floodgate.core.api.inject.PlatformInjector
canRemoveInjection, inject, isInjected, removeInjection
-
Constructor Details
-
Netty4PlatformInjector
public Netty4PlatformInjector()
-
-
Method Details
-
registerAddons
@PostConstruct public void registerAddons() -
addInjectedClient
protected void addInjectedClient(io.netty.channel.Channel channel) -
removeInjectedClient
public void removeInjectedClient(io.netty.channel.Channel channel) -
injectedClients
-
addAddon
public void addAddon(org.geysermc.floodgate.core.api.inject.InjectorAddon<io.netty.channel.Channel> addon) - Specified by:
addAddonin interfaceorg.geysermc.floodgate.core.api.inject.PlatformInjector<io.netty.channel.Channel>
-
removeAddon
public <T extends org.geysermc.floodgate.core.api.inject.InjectorAddon<io.netty.channel.Channel>> T removeAddon(Class<T> addon) - Specified by:
removeAddonin interfaceorg.geysermc.floodgate.core.api.inject.PlatformInjector<io.netty.channel.Channel>
-
injectAddonsCall
public void injectAddonsCall(io.netty.channel.Channel channel, boolean proxyToServer) Method to loop through all the addons and callInjectorAddon.onInject(Object, boolean)ifInjectorAddon.shouldInject().- Parameters:
channel- the channel to injectproxyToServer- true if the proxy is connecting to a server or false when the player is connecting to the proxy or false when the platform isn't a proxy
-
channelClosedCall
public void channelClosedCall(io.netty.channel.Channel channel) Method to loop through all the addons and callInjectorAddon.onChannelClosed(Object)ifInjectorAddon.shouldInject()- Parameters:
channel- the channel that was injected
-
removeAddonsCall
public void removeAddonsCall(io.netty.channel.Channel channel) Method to loop through all the addons and callInjectorAddon.onRemoveInject(Object)ifInjectorAddon.shouldInject().- Parameters:
channel- the channel that was injected
-