Package me.therealkeyis
Class McToDcListener
java.lang.Object
me.therealkeyis.McToDcListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Handles all listen interactions from the bukkit library
-
Constructor Summary
ConstructorDescriptionMcToDcListener
(DiscordBot bot, Logger log) Creates a Minecraft to Discord listener to watch for chat events -
Method Summary
Modifier and TypeMethodDescriptionvoid
onPlayerChat
(org.bukkit.event.player.AsyncPlayerChatEvent event) Relays player chat when the user sends a chat messagevoid
onPlayerJoin
(org.bukkit.event.player.PlayerJoinEvent event) Increases player count in discord bot when a player joins the servervoid
onPlayerLeave
(org.bukkit.event.player.PlayerQuitEvent event) Decreases player count in discord bot when a player leaves the server
-
Constructor Details
-
McToDcListener
Creates a Minecraft to Discord listener to watch for chat events- Parameters:
bot
- A discord bot (should just call the singleton instance)
-
-
Method Details
-
onPlayerJoin
public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) Increases player count in discord bot when a player joins the server- Parameters:
event
- The player join event
-
onPlayerLeave
public void onPlayerLeave(org.bukkit.event.player.PlayerQuitEvent event) Decreases player count in discord bot when a player leaves the server- Parameters:
event
- The player leave event
-
onPlayerChat
public void onPlayerChat(org.bukkit.event.player.AsyncPlayerChatEvent event) Relays player chat when the user sends a chat message- Parameters:
event
- The player chat event
-