Class GeyserSpongePlugin

java.lang.Object
org.geysermc.geyser.platform.sponge.GeyserSpongePlugin
All Implemented Interfaces:
org.geysermc.geyser.GeyserBootstrap

public class GeyserSpongePlugin extends Object implements org.geysermc.geyser.GeyserBootstrap
  • Constructor Details

    • GeyserSpongePlugin

      public GeyserSpongePlugin()
  • Method Details

    • onEnable

      public void onEnable()
      Only to be used for reloading
      Specified by:
      onEnable in interface org.geysermc.geyser.GeyserBootstrap
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface org.geysermc.geyser.GeyserBootstrap
    • onConstruction

      public void onConstruction(@Nullable org.spongepowered.api.event.lifecycle.ConstructPluginEvent event)
      Construct the configuration, logger, and command manager. command manager will only be filled with commands once the connector is started, but it allows us to register events in sponge.
      Parameters:
      event - Not used.
    • onRegisterCommands

      public void onRegisterCommands(@Nonnull org.spongepowered.api.event.lifecycle.RegisterCommandEvent<org.spongepowered.api.command.Command.Raw> event)
      Construct the GeyserSpongeCommandManager and register the commands
      Parameters:
      event - required to register the commands
    • onStartedEngine

      public void onStartedEngine(@Nullable org.spongepowered.api.event.lifecycle.StartedEngineEvent<org.spongepowered.api.Server> event)
      Configure the config properly if remote address is auto. Start connector and ping passthrough, and register subcommands of /geyser
      Parameters:
      event - not required
    • onEngineStopping

      public void onEngineStopping(org.spongepowered.api.event.lifecycle.StoppingEngineEvent<org.spongepowered.api.Server> event)
    • getGeyserConfig

      public GeyserSpongeConfiguration getGeyserConfig()
      Specified by:
      getGeyserConfig in interface org.geysermc.geyser.GeyserBootstrap
    • getGeyserLogger

      public GeyserSpongeLogger getGeyserLogger()
      Specified by:
      getGeyserLogger in interface org.geysermc.geyser.GeyserBootstrap
    • getGeyserCommandManager

      public org.geysermc.geyser.command.GeyserCommandManager getGeyserCommandManager()
      Specified by:
      getGeyserCommandManager in interface org.geysermc.geyser.GeyserBootstrap
    • getGeyserPingPassthrough

      public org.geysermc.geyser.ping.IGeyserPingPassthrough getGeyserPingPassthrough()
      Specified by:
      getGeyserPingPassthrough in interface org.geysermc.geyser.GeyserBootstrap
    • getConfigFolder

      public Path getConfigFolder()
      Specified by:
      getConfigFolder in interface org.geysermc.geyser.GeyserBootstrap
    • getDumpInfo

      public org.geysermc.geyser.dump.BootstrapDumpInfo getDumpInfo()
      Specified by:
      getDumpInfo in interface org.geysermc.geyser.GeyserBootstrap
    • getMinecraftServerVersion

      public String getMinecraftServerVersion()
      Specified by:
      getMinecraftServerVersion in interface org.geysermc.geyser.GeyserBootstrap
    • getServerBindAddress

      @NotNull public @NotNull String getServerBindAddress()
      Specified by:
      getServerBindAddress in interface org.geysermc.geyser.GeyserBootstrap
    • getServerPort

      public int getServerPort()
      Specified by:
      getServerPort in interface org.geysermc.geyser.GeyserBootstrap
    • testFloodgatePluginPresent

      public boolean testFloodgatePluginPresent()
      Specified by:
      testFloodgatePluginPresent in interface org.geysermc.geyser.GeyserBootstrap