Class CommonPlatformInjector
java.lang.Object
org.geysermc.floodgate.core.inject.CommonPlatformInjector
- All Implemented Interfaces:
org.geysermc.floodgate.api.inject.PlatformInjector
public abstract class CommonPlatformInjector
extends Object
implements org.geysermc.floodgate.api.inject.PlatformInjector
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAddon(org.geysermc.floodgate.api.inject.InjectorAddon addon) protected booleanaddInjectedClient(io.netty.channel.Channel channel) voidchannelClosedCall(io.netty.channel.Channel channel) Method to loop through all the addons and callInjectorAddon.onChannelClosed(Channel)ifInjectorAddon.shouldInject()voidinjectAddonsCall(io.netty.channel.Channel channel, boolean proxyToServer) Method to loop through all the addons and callInjectorAddon.onInject(Channel, boolean)ifInjectorAddon.shouldInject().Set<io.netty.channel.Channel>void<T extends org.geysermc.floodgate.api.inject.InjectorAddon>
TremoveAddon(Class<T> addon) voidremoveAddonsCall(io.netty.channel.Channel channel) Method to loop through all the addons and callInjectorAddon.onRemoveInject(Channel)ifInjectorAddon.shouldInject().booleanremoveInjectedClient(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.api.inject.PlatformInjector
canRemoveInjection, inject, isInjected, removeInjection
-
Constructor Details
-
CommonPlatformInjector
public CommonPlatformInjector()
-
-
Method Details
-
registerAddons
@PostConstruct public void registerAddons() -
addInjectedClient
protected boolean addInjectedClient(io.netty.channel.Channel channel) -
removeInjectedClient
public boolean removeInjectedClient(io.netty.channel.Channel channel) -
injectedClients
-
addAddon
public boolean addAddon(org.geysermc.floodgate.api.inject.InjectorAddon addon) - Specified by:
addAddonin interfaceorg.geysermc.floodgate.api.inject.PlatformInjector
-
removeAddon
- Specified by:
removeAddonin interfaceorg.geysermc.floodgate.api.inject.PlatformInjector
-
injectAddonsCall
public void injectAddonsCall(io.netty.channel.Channel channel, boolean proxyToServer) Method to loop through all the addons and callInjectorAddon.onInject(Channel, 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(Channel)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(Channel)ifInjectorAddon.shouldInject().- Parameters:
channel- the channel that was injected
-