Interface BossBar


  • public interface BossBar
    • Method Detail

      • getTitle

        java.lang.String getTitle()
        Get the current title
        Returns:
        the title
      • setTitle

        BossBar setTitle​(java.lang.String title)
        Change the title
        Parameters:
        title - Title can be in either JSON or just text
        Returns:
        The BossBar object
      • getHealth

        float getHealth()
        Get the health
        Returns:
        float between 0F - 1F
      • setHealth

        BossBar setHealth​(float health)
        Change the health
        Parameters:
        health - this float has to be between 0F - 1F
        Returns:
        The BossBar object
      • getColor

        BossColor getColor()
        Get the bossbar color
        Returns:
        The colour
      • setColor

        BossBar setColor​(BossColor color)
        Yay colors!
        Parameters:
        color - Whatever color you want!
        Returns:
        The BossBar object
      • getStyle

        BossStyle getStyle()
        Get the bosbar style
        Returns:
        BossStyle
      • setStyle

        BossBar setStyle​(BossStyle style)
        Change the bosbar style
        Parameters:
        style - BossStyle
        Returns:
        The BossBar object
      • addPlayer

        BossBar addPlayer​(java.util.UUID player)
        Show the bossbar to a player (uuid). This only works for frontend connections. Use #addConnection(UserConnection) for other types.
        Parameters:
        player - uuid of the player
        Returns:
        The BossBar object
      • addConnection

        BossBar addConnection​(UserConnection conn)
        Show the bossbar to a player connection.
        Parameters:
        conn - UserConnection of the connection
        Returns:
        The BossBar object
      • removePlayer

        BossBar removePlayer​(java.util.UUID uuid)
        Removes the bossbar from a player. This only works for frontend connections. For others types, use #removeConnection(UserConnection)
        Parameters:
        uuid - The players UUID
        Returns:
        The BossBar object
      • removeConnection

        BossBar removeConnection​(UserConnection conn)
        Removes the bossbar from a player connection.
        Parameters:
        conn - The UserConnection
        Returns:
        The BossBar object
      • addFlag

        BossBar addFlag​(BossFlag flag)
        Add flags
        Parameters:
        flag - The flag to add
        Returns:
        The BossBar object
      • removeFlag

        BossBar removeFlag​(BossFlag flag)
        Remove flags.
        Parameters:
        flag - The flag to remove
        Returns:
        The BossBar object
      • hasFlag

        boolean hasFlag​(BossFlag flag)
        Parameters:
        flag - The flag to check against
        Returns:
        True if it has the flag
      • getPlayers

        java.util.Set<java.util.UUID> getPlayers()
        Get players. Only returns UUIDs which are front-end. For all connections, use #getConnections()
        Returns:
        UUIDS from players (sorry I lied)
      • getConnections

        java.util.Set<UserConnection> getConnections()
        Get UserConnections.
        Returns:
        UserConnection from players
      • show

        BossBar show()
        Show the bossbar to everyone (In the getPlayer set)
        Returns:
        The BossBar object
      • hide

        BossBar hide()
        Hide the bossbar from everyone (In the getPlayer set)
        Returns:
        The BossBar object
      • isVisible

        boolean isVisible()
        Is it visible?
        Returns:
        visibility changable with show() and hide()
      • getId

        java.util.UUID getId()
        Get the UUID of this bossbar
        Returns:
        Unique Id for this bossbar