Class DiscordUser

java.lang.Object
net.lucypoulton.squirtgun.discord.DiscordUser
All Implemented Interfaces:
net.kyori.adventure.audience.Audience, net.kyori.adventure.pointer.Pointered, net.lucypoulton.squirtgun.platform.audience.PermissionHolder, net.lucypoulton.squirtgun.platform.audience.SquirtgunPlayer, net.lucypoulton.squirtgun.platform.audience.SquirtgunUser
Direct Known Subclasses:
HostedDiscordUser, StandaloneDiscordUser

public abstract class DiscordUser extends Object implements net.lucypoulton.squirtgun.platform.audience.SquirtgunPlayer
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract net.dv8tion.jda.api.entities.User
     
    net.lucypoulton.squirtgun.platform.Gamemode
    Discord obviously doesn't have gamemodes, returns a special value
     
    boolean
    Not supported by Discord - always returns false
    void
    sendMessage​(@NotNull net.kyori.adventure.identity.Identity source, @NotNull net.kyori.adventure.text.Component component, @NotNull net.kyori.adventure.audience.MessageType type)
    Sends a direct message to a user.
    void
    setGamemode​(net.lucypoulton.squirtgun.platform.Gamemode mode)
    Does nothing - Discord doesn't have gamemodes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.kyori.adventure.audience.Audience

    clearTitle, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSound

    Methods inherited from interface net.kyori.adventure.pointer.Pointered

    get, getOrDefault, getOrDefaultFrom, pointers

    Methods inherited from interface net.lucypoulton.squirtgun.platform.audience.SquirtgunPlayer

    getUuid, hasPermission
  • Constructor Details

    • DiscordUser

      public DiscordUser()
  • Method Details

    • discordUser

      public abstract net.dv8tion.jda.api.entities.User discordUser()
    • getUsername

      public String getUsername()
      Specified by:
      getUsername in interface net.lucypoulton.squirtgun.platform.audience.SquirtgunPlayer
    • isOnline

      public boolean isOnline()
      Not supported by Discord - always returns false
      Specified by:
      isOnline in interface net.lucypoulton.squirtgun.platform.audience.SquirtgunPlayer
      Returns:
      false
    • sendMessage

      public void sendMessage(@NotNull @NotNull net.kyori.adventure.identity.Identity source, @NotNull @NotNull net.kyori.adventure.text.Component component, @NotNull @NotNull net.kyori.adventure.audience.MessageType type)
      Sends a direct message to a user.
      Specified by:
      sendMessage in interface net.kyori.adventure.audience.Audience
    • getGamemode

      public net.lucypoulton.squirtgun.platform.Gamemode getGamemode()
      Discord obviously doesn't have gamemodes, returns a special value
      Specified by:
      getGamemode in interface net.lucypoulton.squirtgun.platform.audience.SquirtgunPlayer
      Returns:
      a unique Gamemode specific to Discord
    • setGamemode

      public void setGamemode(net.lucypoulton.squirtgun.platform.Gamemode mode)
      Does nothing - Discord doesn't have gamemodes.
      Specified by:
      setGamemode in interface net.lucypoulton.squirtgun.platform.audience.SquirtgunPlayer