java.lang.Object
io.github.dexrnzacattack.rrdiscordbridge.Events

public class Events extends Object
In-game event handlers
  • Constructor Details

    • Events

      public Events()
  • Method Details

    • onPlayerAchievement

      public static void onPlayerAchievement(Advancement.Type type, IPlayer player, String achievement, @Nullable String description)
      Runs when the player gets an achievement/advancement
      Parameters:
      type - The advancement type
      player - The player
      achievement - The achievement name
      description - The achievement description (if available)
    • onPlayerAchievement

      public static void onPlayerAchievement(Advancement.Type type, IPlayer player, String achievement, @Nullable String description, String wikiName)
      Runs when the player gets an achievement/advancement
      Parameters:
      type - The advancement type
      player - The player
      achievement - The achievement name
      description - The achievement description (if available)
      wikiName - The wiki achievement name to use in the link, e.g: https://minecraft.wiki/w/Advancement#{wikiName}
    • onPlayerJoin

      public static void onPlayerJoin(IPlayer player)
      Runs when a player joins the server
      Parameters:
      player - The player
    • onPlayerLeave

      public static void onPlayerLeave(IPlayer player)
      Runs when a player leaves the server
      Parameters:
      player - The player
    • onPlayerKick

      public static void onPlayerKick(IPlayer player, String reason)
      Runs when a player gets kicked from the server
      Parameters:
      player - The player
      reason - The kick reason
    • onPlayerCommand

      public static void onPlayerCommand(IPlayer player, String command)
      Runs when a player runs a command
      Parameters:
      player - The player
      command - The command message
    • onServerCommand

      public static void onServerCommand(String command)
      Runs when a command is run from the server console
      Parameters:
      command - The command message
    • onChatMessage

      public static void onChatMessage(IPlayer sender, String message, ICancellable event)
      Runs when a player sends a chat message
      Parameters:
      sender - The player that sent the message
      message - The message
      event - The cancellable event
    • onPlayerDeath

      public static void onPlayerDeath(IPlayer player, String message)
      Runs when a player dies
      Parameters:
      player - The player
      message - The death message