Interface GeyserServerPortGetter

All Known Implementing Classes:
IntegratedServerMixin, MinecraftDedicatedServerMixin

public interface GeyserServerPortGetter
Represents a getter to the server port in the dedicated server and in the integrated server.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the server port.
  • Method Details

    • geyser$getServerPort

      int geyser$getServerPort()
      Returns the server port.
      • If it's a dedicated server, it will return the server port specified in the server.properties file.
      • If it's an integrated server, it will return the LAN port if opened, else -1.
      The reason is that MinecraftServer.getPort() doesn't return the LAN port if it's the integrated server, and changing the behavior of this method via a mixin should be avoided as it could have unexpected consequences.
      Returns:
      The server port.