Class ServerEmoteAPI
java.lang.Object
io.github.kosmx.emotes.api.events.server.ServerEmoteAPI
- All Implemented Interfaces:
IEmotecraftService
-
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) booleanisActive()static booleanisForcedEmote(UUID player) Check if the player is forced to play an emoteprotected abstract booleanisForcedEmoteImpl(UUID player) static 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.kosmx.emotes.api.services.IEmotecraftService
getName, 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
@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
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
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceIEmotecraftService
-