Class IntegratedServerMixin

java.lang.Object
org.geysermc.geyser.platform.fabric.mixin.client.IntegratedServerMixin
All Implemented Interfaces:
GeyserServerPortGetter

@Environment(CLIENT) public class IntegratedServerMixin extends Object implements GeyserServerPortGetter
  • Constructor Details

    • IntegratedServerMixin

      public IntegratedServerMixin()
  • Method Details

    • geyser$getServerPort

      public int geyser$getServerPort()
      Description copied from interface: GeyserServerPortGetter
      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.
      Specified by:
      geyser$getServerPort in interface GeyserServerPortGetter
      Returns:
      The server port.