Class StandaloneDiscordPlatform

java.lang.Object
net.lucypoulton.squirtgun.discord.DiscordPlatform
net.lucypoulton.squirtgun.discord.standalone.StandaloneDiscordPlatform
All Implemented Interfaces:
net.lucypoulton.squirtgun.platform.Platform

public class StandaloneDiscordPlatform extends DiscordPlatform
A Platform implementation for standalone Discord bots.
  • Constructor Details

    • StandaloneDiscordPlatform

      public StandaloneDiscordPlatform(net.dv8tion.jda.api.JDA jda, String commandPrefix)
  • Method Details

    • getPlayer

      public DiscordUser getPlayer(UUID uuid)
      Description copied from class: DiscordPlatform
      Gets a DiscordUser from a user's Minecraft UUID.
      Specified by:
      getPlayer in interface net.lucypoulton.squirtgun.platform.Platform
      Specified by:
      getPlayer in class DiscordPlatform
      Parameters:
      uuid - the UUID of the player to get
      Returns:
      a SquirtgunPlayer if the user is known and has a linked Discord account, otherwise null
    • getPlayer

      @Nullable public @Nullable DiscordUser getPlayer(String name)
      Fetches a user by their Discord username and discriminator, in the format username#0000, where the username must be between 2 and 32 characters (inclusive) matching the exact casing and the discriminator must be exactly 4 digits.
      Specified by:
      getPlayer in interface net.lucypoulton.squirtgun.platform.Platform
      Specified by:
      getPlayer in class DiscordPlatform
      Parameters:
      name - the name of the player to get
      Returns:
      a SquirtgunPlayer if the user is known has a linked Discord account, otherwise null
    • getLogger

      public Logger getLogger()
    • getTaskScheduler

      public net.lucypoulton.squirtgun.platform.scheduler.TaskScheduler getTaskScheduler()
    • getEventManager

      public net.lucypoulton.squirtgun.platform.event.EventManager getEventManager()
    • getConsole

      public net.lucypoulton.squirtgun.platform.audience.SquirtgunUser getConsole()
    • getConfigPath

      public Path getConfigPath(net.lucypoulton.squirtgun.plugin.SquirtgunPlugin<?> plugin)