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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addAddon(org.geysermc.floodgate.api.inject.InjectorAddon addon)
     
    protected boolean
    addInjectedClient(io.netty.channel.Channel channel)
     
    void
    channelClosedCall(io.netty.channel.Channel channel)
    Method to loop through all the addons and call InjectorAddon.onChannelClosed(Channel) if InjectorAddon.shouldInject()
    void
    injectAddonsCall(io.netty.channel.Channel channel, boolean proxyToServer)
    Method to loop through all the addons and call InjectorAddon.onInject(Channel, boolean) if InjectorAddon.shouldInject().
    Set<io.netty.channel.Channel>
     
    void
     
    <T extends org.geysermc.floodgate.api.inject.InjectorAddon>
    T
    removeAddon(Class<T> addon)
     
    void
    removeAddonsCall(io.netty.channel.Channel channel)
    Method to loop through all the addons and call InjectorAddon.onRemoveInject(Channel) if InjectorAddon.shouldInject().
    boolean
    removeInjectedClient(io.netty.channel.Channel channel)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      public Set<io.netty.channel.Channel> injectedClients()
    • addAddon

      public boolean addAddon(org.geysermc.floodgate.api.inject.InjectorAddon addon)
      Specified by:
      addAddon in interface org.geysermc.floodgate.api.inject.PlatformInjector
    • removeAddon

      public <T extends org.geysermc.floodgate.api.inject.InjectorAddon> T removeAddon(Class<T> addon)
      Specified by:
      removeAddon in interface org.geysermc.floodgate.api.inject.PlatformInjector
    • injectAddonsCall

      public void injectAddonsCall(io.netty.channel.Channel channel, boolean proxyToServer)
      Method to loop through all the addons and call InjectorAddon.onInject(Channel, boolean) if InjectorAddon.shouldInject().
      Parameters:
      channel - the channel to inject
      proxyToServer - 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 call InjectorAddon.onChannelClosed(Channel) if InjectorAddon.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 call InjectorAddon.onRemoveInject(Channel) if InjectorAddon.shouldInject().
      Parameters:
      channel - the channel that was injected