Class ActionBar

java.lang.Object
com.cryptomorin.xseries.messages.ActionBar

public class ActionBar
extends Object
A reflection API for action bars in Minecraft. Fully optimized - Supports 1.8.8+ and above. Requires ReflectionUtils. Messages are not colorized by default.

Action bars are text messages that appear above the player's hotbar Note that this is different than the text appeared when switching between items. Those messages show the item's name and are different from action bars. The only natural way of displaying action bars is when mounting.

Action bars cannot fade or stay like titles. For static Action bars you'll need to send the packet every 2 seconds (40 ticks) for it to stay on the screen without fading.

PacketPlayOutTitle: https://wiki.vg/Protocol#Title

Version:
2.1.1
Author:
Crypto Morin
See Also:
ReflectionUtils
  • Constructor Summary

    Constructors 
    Constructor Description
    ActionBar()  
  • Method Summary

    Modifier and Type Method Description
    static void clearActionBar​(org.bukkit.entity.Player player)
    Clear the action bar by sending an empty message.
    static void clearPlayersActionBar()
    Clear the action bar by sending an empty message to all the online players.
    static void sendActionBar​(org.bukkit.entity.Player player, String message)
    Sends an action bar to a player.
    static void sendActionBar​(org.bukkit.plugin.java.JavaPlugin plugin, org.bukkit.entity.Player player, String message, long duration)
    Sends an action bar to a player for a specific amount of ticks.
    static void sendActionBarWhile​(org.bukkit.plugin.java.JavaPlugin plugin, org.bukkit.entity.Player player, String message, Callable<Boolean> callable)
    Sends an action bar to a player for a specific amount of ticks.
    static void sendActionBarWhile​(org.bukkit.plugin.java.JavaPlugin plugin, org.bukkit.entity.Player player, Callable<String> message, Callable<Boolean> callable)
    Sends an action bar to a player for a specific amount of ticks.
    static void sendPlayersActionBar​(String message)
    Sends an action bar all the online players.

    Methods inherited from class java.lang.Object

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