[1.8-1.17] Harmony Scoreboard | NMS Async | PlaceHolderAPI Support 1.9.0

NMS Asnyc Lightweight Scoreboard Plugin

  1. HarmonyPlugins
    Tested Minecraft Versions:
    • 1.8
    • 1.12
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    • 1.17
    Source Code:
    https://github.com/HarmonyPlugins/HarmonyBoard
    [​IMG]
    Description
    Harmony Scoreboard (or HarmonyBoard for short) is a plugin that provides packet-based asynchronous scoreboards flicker-free and price free.
    [​IMG]
    Commands and Permissions
    /hboard help | Reveals all commands
    /hboard reload | Reloads configs
    /hboard scoreboard
    /hboard scoreboard remove %player% | Removes scoreboard
    /hboard scoreboard set %player% %scoreboard% | Changes scoreboard
    /hboard toggle | Toggles your scoreboard
    harmonyboard.help - /hboard help
    harmonyboard.reload - /hboard reload
    harmonyboard.scoreboard - /hboard scoreboard
    harmonyboard.toggle - /hboard toggle

    Configuration
    config.yml is responsible for setting the default scoreboard, enabling permission-based scoreboards and per world scoreboards
    Code (YAML):

    enable_restricted_scoreboards
    : false
    restricted_scoreboards
    :
      scoreboard2
    : "permission.for.scoreboard2"

    enable_perworld_scoreboards
    : false
    world_scoreboards
    :
      scoreboardworld
    : "world"
      scoreboardend
    : "world_the_end"
    scoreboard_update_rate
    : 1

    save_scoreboard_preferences
    : false

    mysql
    : false
    host
    : "127.0.0.1"
    port
    : 3306
    username
    : "root"
    password
    : "pass"
    database
    : "harmonyboard"
     
    language.yml is responsible for the chat messages that you would receive whilst using the plugin
    Code (YAML):

    prefix
    : "&f[&bHarmony&f]"
    messages
    :
    error
    :
       nonplayer
    : "You must be a player to run this command."
       no_permission
    : "You do not have the required permission to perform this command."
       invalid_command
    : "The command you were trying to perform does not exist."
       invalid_arguments
    : "Please provide the right arguments for the command."
       invalid_player
    : "Player does not exist or is not online."
      admin
    :
       reloaded
    : "Config successfully reloaded."
       toggle_on
    : "Toggled scoreboard on successfully."
       toggle_off
    : "Toggled scoreboard off successfully."
     
    Scoreboards and Animations
    The names of scoreboards are based on their filename in the Scoreboards folder.
    Code (YAML):
    title: "Your Server Network"
    lines
    :
    - "a%default%a"
    - "Hello &b%player%&f,"
    - " "
    - "Online Players
    : %online%"
    - "  "
    - "&byourserver.gg"
    - "a%default%a "
    The names of animations are based on their filename in the Animations folder.
    Code (YAML):
    delay: 5
    lines
    :
    - "&a========================="
    - "&b========================="
    - "&c========================="
    [​IMG]
    Placeholders
    Harmony Scoreboard has plenty of built-in placeholders and symbols.

    %player% - shows the player's name
    %online% - shows the number of players online
    %health% - shows health as 20.0
    %health_hearts% - shows health as ❤❤❤❤❤❤❤❤❤❤
    %ping% - shows player's latency
    %posx% - shows the X coordinate of the player's position
    %posy% - shows the Y coordinate of the player's position
    %posz% - shows the Z coordinate of the player's position
    %posxow% - Shows the X coordinate in the Overworld
    %poszow% - Shows the Z coordinate in the Overworld
    %heart% - ♥
    %king% - ♔
    %omega% - Ω
    %queen% - ♕
    %skull% - ☠
    %star% - ★
    %star_hollow% - ☆
    %telephone% - ☏

    API
    Harmony Scoreboard has an easy-to-use API for registering placeholders and changing the player's scoreboard.

    If you want to register placeholders when your plugin loads, make sure to have Harmony Scoreboard as a dependency.

    Code (YAML):
    depend: [HarmonyScoreboard]
    Registering Placeholders
    Every placeholder needs to be of type HarmonyPlaceholder. Here is an example of a placeholder that replaces %health% with the player's health.

    Code (Java):
    public class HealthPlaceholder extends HarmonyPlaceholder {
       @Override
       public String getName() {
           return "health";
       }
       @Override
       public String getValue(Player player) {
           return String.valueOf(player.getHealth());
       }
    }
    Then we need to register the placeholder. That can be easily done with

    Code (Java):
    HarmonyBoardAPI.registerPlaceholder(new HealthPlaceholder());
    All HarmonyBoardAPI functions are static, there is no need to create an instance.

    In order to remove the placeholder, you can either remove it based on its instance or on its name.

    Code (Java):
    HarmonyBoardAPI.unregisterPlaceholder(healthplaceholder);
    HarmonyBoardAPI.unregisterPlaceholder("health");
    Setting Scoreboards
    You can set a player's scoreboard with the setScoreboard function. It takes as parameters the player and the name of the scoreboard you want to set. It bypasses permission and world check.

    Code (Java):
    try {
       HarmonyBoardAPI.setScoreboard(player, "examplescoreboard");
       HarmonyBoardAPI.removeScoreboard(player); // to remove it afterwards
    } catch (HarmonyBoardException e) {
       e.printStackTrace();
    }
    HarmonyBoardException is thrown if the player is null or if the name of the scoreboard is invalid.
    [​IMG]

Recent Reviews

  1. HallyosMC
    HallyosMC
    3/5,
    Version: 1.8.5
    Le plugin ne fonctionne pas du tout sur mon serveur, il ne génère aucune donnée sur le serveur et dans la base de donnée, mais il génère bien les fichiers dans le FTP. Ajoutez-moi sur Discord s'il vous plaît Eraysere#0001 Merci ;)
    1. HarmonyPlugins
      Author's Response
      I added you on discord, although I usually suggest using the discussions tab to post error logs in order to troubleshoot or using github issues or private messages in case you need to reveal database credentials. Please do that from now on.
  2. Thakurz
    Thakurz
    5/5,
    Version: 1.7.0
    Great plugin overall very satisfied placeholders work perfectly i did whole setup with customization in less than 1 hours.
  3. howtoNhut
    howtoNhut
    5/5,
    Version: 1.5.5
    An excellent scoreboard plugin: D However, currently does not support saving user scoreboard data, it would be nice if you add it. :p
    1. HarmonyPlugins
      Author's Response
      Noted. If you have any other suggestion, feel free to leave it in the Discussions tab. I actively check for bug reports and feedback and even credit people who give me suggestions in update logs if you are interested :)
  4. Paiste_
    Paiste_
    5/5,
    Version: 1.5.5
    What an absolutely terrific plugin. Have tried a few scoreboards with frustrating configs and placeholders not working - this just works great. Wondering if there is a way to remove the line numbers on the far right from the display?
    1. HarmonyPlugins
      Author's Response
      I don't think there is just yet, but then again, I don't know everything.
  5. Nononitas
    Nononitas
    5/5,
    Version: 1.3.0
    Tried it on 1.16. There is really no flickering. Much adjustable. Developer tries to fix bugs.
    Overall a great plugin
    1. HarmonyPlugins
      Author's Response
      Thanks for letting me know this update did the trick.
  6. Emelji
    Emelji
    5/5,
    Version: 1.2.0
    I got this plugin and it worked perfectly nice commands and easy to use, you should make an anticheat