Class ServerEmoteAPI
java.lang.Object
io.github.kosmx.emotes.api.events.server.ServerEmoteAPI
- All Implemented Interfaces:
org.redlance.common.services.AdvancedService
public abstract class ServerEmoteAPI
extends Object
implements org.redlance.common.services.AdvancedService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidforcePlayEmote(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation emote) Set the player to FORCE play emote.static voidforcePlayEmote(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> getPlayedEmote(UUID player) Get the played emote and the time for the playerprotected abstract it.unimi.dsi.fastutil.Pair<com.zigythebird.playeranimcore.animation.Animation, Float> getPlayedEmoteImpl(UUID player) static booleanisForcedEmote(UUID player) Check if the player is forced to play an emoteprotected abstract booleanisForcedEmoteImpl(UUID player) booleanstatic voidplayEmote(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation emote, boolean forced) Set the player to play emote.static voidplayEmote(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation emote, float tick, boolean forced) Set the player to play emote.static voidsetPlayerPlayingEmote(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation emote) Set the player to play emote.static voidsetPlayerPlayingEmote(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation emote, float tick) Set the player to play emote.protected abstract voidsetPlayerPlayingEmoteImpl(UUID player, @Nullable com.zigythebird.playeranimcore.animation.Animation KeyframeAnimation, float tick, boolean isForced) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.redlance.common.services.AdvancedService
getPriority
-
Field Details
-
INSTANCE
-
-
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_VERIFICATIONis 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_VERIFICATIONis used for that- Parameters:
emote- the new emotetick- 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 emotetick- 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 playemote- animation,nullto 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 playemote- animation,nullto stop playing.tick- First tickforced- can they stop
-
getPlayedEmote
-
isForcedEmote
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
-
isForcedEmoteImpl
-
isServiceActive
public boolean isServiceActive()- Specified by:
isServiceActivein interfaceorg.redlance.common.services.AdvancedService
-