Class Events
java.lang.Object
io.github.dexrnzacattack.rrdiscordbridge.Events
In-game event handlers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
onChatMessage
(IPlayer sender, String message, ICancellable event) Runs when a player sends a chat messagestatic void
onPlayerAchievement
(Advancement.Type type, IPlayer player, String achievement, String description) Runs when the player gets an achievement/advancementstatic void
onPlayerAchievement
(Advancement.Type type, IPlayer player, String achievement, String description, String wikiName) Runs when the player gets an achievement/advancementstatic void
onPlayerCommand
(IPlayer player, String command) Runs when a player runs a commandstatic void
onPlayerDeath
(IPlayer player, String message) Runs when a player diesstatic void
onPlayerJoin
(IPlayer player) Runs when a player joins the serverstatic void
onPlayerKick
(IPlayer player, String reason) Runs when a player gets kicked from the serverstatic void
onPlayerLeave
(IPlayer player) Runs when a player leaves the serverstatic void
onServerCommand
(String command) Runs when a command is run from the server console
-
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 typeplayer
- The playerachievement
- The achievement namedescription
- 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 typeplayer
- The playerachievement
- The achievement namedescription
- The achievement description (if available)wikiName
- The wiki achievement name to use in the link, e.g:https://minecraft.wiki/w/Advancement#{wikiName}
-
onPlayerJoin
Runs when a player joins the server- Parameters:
player
- The player
-
onPlayerLeave
Runs when a player leaves the server- Parameters:
player
- The player
-
onPlayerKick
Runs when a player gets kicked from the server- Parameters:
player
- The playerreason
- The kick reason
-
onPlayerCommand
Runs when a player runs a command- Parameters:
player
- The playercommand
- The command message
-
onServerCommand
Runs when a command is run from the server console- Parameters:
command
- The command message
-
onChatMessage
Runs when a player sends a chat message- Parameters:
sender
- The player that sent the messagemessage
- The messageevent
- The cancellable event
-
onPlayerDeath
Runs when a player dies- Parameters:
player
- The playermessage
- The death message
-