Interface GeyserBedrockPingEvent

All Superinterfaces:
org.geysermc.event.Event

public interface GeyserBedrockPingEvent extends org.geysermc.event.Event
Called whenever Geyser gets pinged by a Bedrock client.

This event allows you to modify/obtain the MOTD, maximum player count, and current number of players online. Geyser will reply to the client with the information provided in this event.

  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the InetSocketAddress of the client pinging us.
    int
    Gets the maximum number of players that can join this server
    void
    maxPlayerCount(int max)
    Sets the maximum number of players that can join this server, the given number cannot be below 1.
    @org.checkerframework.checker.index.qual.NonNegative int
    Gets the current number of players.
    void
    playerCount(int count)
    Sets how many players are currently online, the given number cannot be below 0.
    @Nullable String
    Gets the primary motd.
    void
    primaryMotd(@NonNull String primary)
    Sets the given string as the primary motd, the given string cannot be null.
    @Nullable String
    Gets the secondary motd.
    void
    secondaryMotd(@NonNull String secondary)
    Sets the given string as the secondary motd, the given string cannot be null.
  • Method Details

    • primaryMotd

      void primaryMotd(@NonNull String primary)
      Sets the given string as the primary motd, the given string cannot be null.
      Parameters:
      primary - the string to set as the primary motd
    • secondaryMotd

      void secondaryMotd(@NonNull String secondary)
      Sets the given string as the secondary motd, the given string cannot be null. Note: the secondary motd is only used for the LAN game entry.
      Parameters:
      secondary - the string to set as the secondary motd
    • playerCount

      void playerCount(int count)
      Sets how many players are currently online, the given number cannot be below 0.
      Parameters:
      count - the number to set
    • maxPlayerCount

      void maxPlayerCount(int max)
      Sets the maximum number of players that can join this server, the given number cannot be below 1.
      Parameters:
      max - the number to set
    • primaryMotd

      @Nullable String primaryMotd()
      Gets the primary motd.
      Returns:
      the primary motd string
    • secondaryMotd

      @Nullable String secondaryMotd()
      Gets the secondary motd.
      Returns:
      the secondary motd string
    • playerCount

      @org.checkerframework.checker.index.qual.NonNegative int playerCount()
      Gets the current number of players.
      Returns:
      number of players online
    • maxPlayerCount

      int maxPlayerCount()
      Gets the maximum number of players that can join this server
      Returns:
      maximum number of players that can join
    • address

      @NonNull InetSocketAddress address()
      Gets the InetSocketAddress of the client pinging us.
      Returns:
      a InetSocketAddress