Class GeyserImpl

java.lang.Object
org.geysermc.geyser.GeyserImpl
All Implemented Interfaces:
GeyserApiBase, GeyserApi

public class GeyserImpl extends Object implements GeyserApi
  • Field Details

  • Method Details

    • connectionByName

      public @Nullable GeyserSession connectionByName(@NonNull String name)
      Description copied from interface: GeyserApi
      Gets the session from the given name, if applicable.
      Specified by:
      connectionByName in interface GeyserApi
      Specified by:
      connectionByName in interface GeyserApiBase
      Parameters:
      name - the uuid of the session
      Returns:
      the session from the given name, if applicable
    • onlineConnections

      public @NonNull List<GeyserSession> onlineConnections()
      Description copied from interface: GeyserApi
      Gets all the online sessions.
      Specified by:
      onlineConnections in interface GeyserApi
      Specified by:
      onlineConnections in interface GeyserApiBase
      Returns:
      all the online sessions
    • connectionByUuid

      public @Nullable GeyserSession connectionByUuid(@NonNull UUID uuid)
      Description copied from interface: GeyserApi
      Gets the session from the given UUID, if applicable. The player must be logged in to the Java server for this to return a non-null value.
      Specified by:
      connectionByUuid in interface GeyserApi
      Specified by:
      connectionByUuid in interface GeyserApiBase
      Parameters:
      uuid - the UUID of the session
      Returns:
      the session from the given UUID, if applicable
    • connectionByXuid

      public @Nullable GeyserSession connectionByXuid(@NonNull String xuid)
      Description copied from interface: GeyserApi
      Gets the session from the given XUID, if applicable.
      Specified by:
      connectionByXuid in interface GeyserApi
      Specified by:
      connectionByXuid in interface GeyserApiBase
      Parameters:
      xuid - the XUID of the session
      Returns:
      the session from the given UUID, if applicable
    • shutdown

      public void shutdown()
      Description copied from interface: GeyserApi
      Shuts down the current Geyser instance.
      Specified by:
      shutdown in interface GeyserApi
    • reload

      public void reload()
      Description copied from interface: GeyserApi
      Reloads the current Geyser instance.
      Specified by:
      reload in interface GeyserApi
    • productionEnvironment

      public boolean productionEnvironment()
      Returns false if this Geyser instance is running in an IDE. This only needs to be used in cases where files expected to be in a jarfile are not present.
      Specified by:
      productionEnvironment in interface GeyserApi
      Returns:
      true if the version number is not 'DEV'.
    • start

      public static GeyserImpl start(PlatformType platformType, GeyserBootstrap bootstrap)
    • getLogger

      public GeyserLogger getLogger()
    • getConfig

      public GeyserConfiguration getConfig()
    • getCommandManager

      public CommandManager getCommandManager()
    • getWorldManager

      public WorldManager getWorldManager()
    • registerPluginChannel

      public void registerPluginChannel(String channel) throws IllegalArgumentException
      Register a Plugin Channel This will maintain what channels are registered and ensure new connections and existing connections are registered correctly
      Parameters:
      channel - Channel to register
      Throws:
      IllegalArgumentException
    • unregisterPluginChannel

      public void unregisterPluginChannel(String channel)
      Unregister a Plugin Channel This will maintain what channels are registered and ensure new connections and existing connections are registered correctly
      Parameters:
      channel - Channel to unregister
    • getInstance

      public static GeyserImpl getInstance()
    • getSessionManager

      public SessionManager getSessionManager()
    • getCipher

      public FloodgateCipher getCipher()
    • getSkinUploader

      public FloodgateSkinUploader getSkinUploader()
    • getNewsHandler

      public NewsHandler getNewsHandler()
    • isShuttingDown

      public boolean isShuttingDown()
    • getScheduledThread

      public ScheduledExecutorService getScheduledThread()
    • getBedrockServer

      public com.nukkitx.protocol.bedrock.BedrockServer getBedrockServer()
    • getPlatformType

      public PlatformType getPlatformType()
    • getBootstrap

      public GeyserBootstrap getBootstrap()
    • getEventManager

      public EventManager getEventManager()
    • getExtensionManager

      public ExtensionManager getExtensionManager()
    • getRegisteredPluginChannels

      public List<String> getRegisteredPluginChannels()
    • getMetrics

      public Metrics getMetrics()
    • setShouldStartListener

      public static void setShouldStartListener(boolean shouldStartListener)
      This is used in GeyserConnect to stop the bedrock server binding to a port