Class ServerEmoteAPI

java.lang.Object
io.github.kosmx.emotes.api.events.server.ServerEmoteAPI
All Implemented Interfaces:
IEmotecraftService

public abstract class ServerEmoteAPI extends Object implements IEmotecraftService
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final ServerEmoteAPI
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    forcePlayEmote(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation emote)
    Set the player to FORCE play emote.
    static void
    forcePlayEmote(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation emote, float tick)
    Set the player to FORCE play emote.
    static @Nullable it.unimi.dsi.fastutil.Pair<com.zigythebird.playeranimcore.animation.Animation,Float>
    Get the played emote and the time for the player
    protected abstract it.unimi.dsi.fastutil.Pair<com.zigythebird.playeranimcore.animation.Animation,Float>
     
    boolean
     
    static boolean
    Check if the player is forced to play an emote
    protected abstract boolean
     
    static void
    playEmote(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation emote, boolean forced)
    Set the player to play emote.
    static void
    playEmote(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation emote, float tick, boolean forced)
    Set the player to play emote.
    static void
    setPlayerPlayingEmote(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation emote)
    Set the player to play emote.
    static void
    setPlayerPlayingEmote(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation emote, float tick)
    Set the player to play emote.
    protected abstract void
    setPlayerPlayingEmoteImpl(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation KeyframeAnimation, float tick, boolean isForced)
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface io.github.kosmx.emotes.api.services.IEmotecraftService

    getName, getPriority
  • Field Details

  • Constructor Details

    • ServerEmoteAPI

      public ServerEmoteAPI()
  • Method Details

    • setPlayerPlayingEmote

      public static void setPlayerPlayingEmote(UUID player, @Nullable @Nullable com.zigythebird.playeranimcore.animation.Animation emote)
      Set the player to play emote. Supply with null to stop played emote However this is not recommended for verification. ServerEmoteEvents.EMOTE_VERIFICATION is used for that
      Parameters:
      emote - the new emote
    • setPlayerPlayingEmote

      public static void setPlayerPlayingEmote(UUID player, @Nullable @Nullable com.zigythebird.playeranimcore.animation.Animation emote, float tick)
      Set the player to play emote. Supply with null to stop played emote However this is not recommended for verification. ServerEmoteEvents.EMOTE_VERIFICATION is used for that
      Parameters:
      emote - the new emote
      tick - First tick
    • forcePlayEmote

      public static void forcePlayEmote(UUID player, @Nullable @Nullable com.zigythebird.playeranimcore.animation.Animation emote)
      Set the player to FORCE play emote. Forced emotes can only be stopped by a plugin, or by ending the emote.
      Parameters:
      emote - the new emote
    • forcePlayEmote

      public static void forcePlayEmote(UUID player, @Nullable @Nullable com.zigythebird.playeranimcore.animation.Animation emote, float tick)
      Set the player to FORCE play emote. Forced emotes can only be stopped by a plugin, or by ending the emote.
      Parameters:
      emote - the new emote
      tick - First tick
    • playEmote

      public static void playEmote(UUID player, @Nullable @Nullable com.zigythebird.playeranimcore.animation.Animation emote, boolean forced)
      Set the player to play emote.
      Parameters:
      player - whom to play
      emote - animation, null to stop playing.
      forced - can they stop
    • playEmote

      public static void playEmote(UUID player, @Nullable @Nullable com.zigythebird.playeranimcore.animation.Animation emote, float tick, boolean forced)
      Set the player to play emote.
      Parameters:
      player - whom to play
      emote - animation, null to stop playing.
      tick - First tick
      forced - can they stop
    • getPlayedEmote

      @Nullable public static @Nullable it.unimi.dsi.fastutil.Pair<com.zigythebird.playeranimcore.animation.Animation,Float> getPlayedEmote(UUID player)
      Get the played emote and the time for the player
      Parameters:
      player - questionable player
      Returns:
      Emote and time, NULL if not playing
    • isForcedEmote

      public static boolean isForcedEmote(UUID player)
      Check if the player is forced to play an emote
      Parameters:
      player - who
      Returns:
      forced
    • setPlayerPlayingEmoteImpl

      protected abstract void setPlayerPlayingEmoteImpl(UUID player, @Nullable @Nullable com.zigythebird.playeranimcore.animation.Animation KeyframeAnimation, float tick, boolean isForced)
    • getPlayedEmoteImpl

      protected abstract it.unimi.dsi.fastutil.Pair<com.zigythebird.playeranimcore.animation.Animation,Float> getPlayedEmoteImpl(UUID player)
    • isForcedEmoteImpl

      protected abstract boolean isForcedEmoteImpl(UUID player)
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface IEmotecraftService