Class McToDcListener

java.lang.Object
me.therealkeyis.McToDcListener
All Implemented Interfaces:
org.bukkit.event.Listener

public class McToDcListener extends Object implements org.bukkit.event.Listener
Handles all listen interactions from the bukkit library
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a Minecraft to Discord listener to watch for chat events
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onPlayerChat(org.bukkit.event.player.AsyncPlayerChatEvent event)
    Relays player chat when the user sends a chat message
    void
    onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event)
    Increases player count in discord bot when a player joins the server
    void
    onPlayerLeave(org.bukkit.event.player.PlayerQuitEvent event)
    Decreases player count in discord bot when a player leaves the server

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • McToDcListener

      public McToDcListener(DiscordBot bot, Logger log)
      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