AnimatedScoreboard icon

AnimatedScoreboard -----

An animated and anti-flicker scoreboard plugin with 1500+ placeholders, effects and eventtriggers



Update v0.1.0
Update:

  • The EventTriggers are now fully functional, without interfering with any other plugin such as PermissionsEx or WorldEdit!
  • Added bStats to see how many servers use my plugin, along with if the server has event-triggers and placeholderapi enabled.
  • Update the version check to spigot's new api
  • Added a new tag: Repeat
  • The scoreboard now correctly works along side other scoreboard plugins like MCMMO who temporarly replace the scoreboard.
  • A lot of different bugfixes
  • Added an extra information command to see which version your server is running
  • The tags will now automatically refer to a default value when a certain attribute is not set
  • Placeholders can now also be used as tag attributes, as long as they represent a number as a placeholder. (e.g. : %player_health%)
  • The score of a line can also be a placeholder that represents a number
  • You can now disable the use of PlaceholderAPI even when it is an active plugin on the server
  • Added a GLOBAL keyword, this is the scoreboard that will be used when there is no other scoreboard active in that world. You can also switch to it by doing '/asb switch '<global_scoreboard_name>''. This scoreboard can be set just like any other scoreboard, instead of the world name you just use 'global' and it will automatically assign it
  • Added an API for other plugins to use, with this api you can replace lines, switch scoreboards, add a custom tag to the scoreboard and much more!
  • Changed a lot about how scoreboards and lines load from the config.
Bug fixes:
  • Fixed a bug where lines with the same score wouldn't show up
  • Fixed a bug where empty lines wouldn't show up
  • Fixed a bug where some random scoreboard lines would show directly after a restart
  • Fixed a bug where it would take a couple of seconds for the scoreboard to show up after a restart
  • The reload command now does what it is supposed to do. Reloading all triggers and scoreboards
  • Fixed a bug where triggers wouldn't work after a restart


Tags:
  • There is now a repeat tag that comes with just one attribute: times, which indicates how many times it should repeat the text.
  • The update tag now has two attributes: ticks and stay. The new stay attribute indicates how long the line should stay before going to the next line!
The new API:
Code (Java):
AnimatedScoreboardAPI api = AnimatedScoreboard. loadAPI (pluginInstance ) ;

//It will always return an optional and the developer has to check if the ScoreboardPlayer or PlayerScoreboard object is returned!
Optional <ScoreboardPlayer > sp = api. getScoreboardPlayer (player. getUniqueId ( ) ) ;
Optional <PlayerScoreboard > ps = api. getPlayerScoreboard (player. getUniqueId ( ) ) ;

//Checking if the scoreboard is present
...
//After making sure that they are both present you can change some things in the scoreboard or switch the scoreboard completely!
PlayerScoreboard playerScoreboard = ps. get ( ) ;


/**
     * Replaces or adds a line to the scoreboard of this player. It will replace
     * a line with the same score or when there is no line with that score it
     * will add a new line
     *
     * @param score
     *            The score of the line you want to replace or add as an extra
     * @param text
     *            The text you want to new line to display, this can also be
     *            tags
     * @param update
     *            How often you want to line to update in ticks
     * @param time
     *            For how long you want this line to stay in ticks
     */

playerScoreboard. replace ( int score, String text, int update, long time ) ;
   

    /**
     * Replaces or adds a line to the scoreboard of this player. It will replace
     * a line with the same score or when there is no line with that score it
     * will add a new line
     *
     * @param line
     *            The line you want to replace
     * @param text
     *            The text you want to new line to display, this can also be
     *            tags
     * @param update
     *            How often you want to line to update in ticks
     * @param time
     *            For how long you want this line to stay in ticks
     */

playerScoreboard. replace ( Line line, String text, int update, long time ) ;
 

  /**
     * Replaces or adds a line to the scoreboard of this player. It will replace
     * a line with the same score or when there is no line with that score it
     * will add a new line
     *
     * @param line
     *            The line you want to replace
     * @param tag
     *            The line will be added/replaced based on what the tag is
     * @param update
     *            How often you want to line to update in ticks
     * @param time
     *            For how long you want this line to stay in ticks
     */

playerScoreboard. replace ( Line line, PlayerScoreboardTag tag, int update, long time ) ;
Let's give a simple example of replacing a certain line of the scoreboard with another line when a player interacts with a villager:
Code (Java):
    @EventHandler
    public void onInteract (PlayerInteractEntityEvent event ) {
        Player player = event. getPlayer ( ) ;
        Entity entity = event. getRightClicked ( ) ;

        if ( ! (entity instanceof Villager ) )
            return ;

        Optional <PlayerScoreboard > ps = api. getPlayerScoreboard (player. getUniqueId ( ) ) ;
        // The player doesn't have any scoreboards active at this time!
        if ( !ps. isPresent ( ) )
            return ;

        PlayerScoreboard playerScoreboard = ps. get ( ) ;
        TagAttributes tagAttributes = LineType. SCROLL. newAttributes ( ) ;
        PlayerScoreboardTag tag = LineType. SCROLL. newTag (tagAttributes, "Hello &a%player_name%&r, you interacted with a villager!" ) ;
        playerScoreboard. replace ( Line. TITLE, tag, 5, 200 ) ;
    }
----------, Jan 14, 2018
Resource Information
Author:
----------
Total Downloads: 458,388
First Release: Mar 28, 2016
Last Update: Jun 13, 2024
Category: ---------------
All-Time Rating:
188 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings