Interface InjectorAddon<C>
public interface InjectorAddon<C>
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonChannelClosed(C channel) Called when the channel has been closed.voidCalled when injecting a specific channel (every client that is connected to the server has his own channel).voidonRemoveInject(C channel) Called when Floodgate is removing the injection from the server.booleanIf the Injector should callonInject(C, boolean)
-
Method Details
-
onInject
Called when injecting a specific channel (every client that is connected to the server has his own channel). Internally used for the Floodgate debugger and data handler but can also be used for third party things.- Parameters:
channel- the channel that the injector is injectingtoServer- if the connection is between a proxy and a server
-
onChannelClosed
Called when the channel has been closed. Note that this method will be called for every closed connection (if it is injected), so it'll also run this method for closed connections between a server and the proxy (when Floodgate is running on a proxy).- Parameters:
channel- the channel that the injector injected
-
onRemoveInject
Called when Floodgate is removing the injection from the server. The addon should remove his traces otherwise it is likely that an error will popup after the server is injected again.- Parameters:
channel- the channel that the injector injected
-
shouldInject
boolean shouldInject()If the Injector should callonInject(C, boolean)- Returns:
- true if it should, false otherwise
-