Skip to content

frost-byte/QuickBoardX

Repository files navigation

QuickBoardX

A fast, free Scoreboard plugin for Spigot and Paper

Features

  • Free!
  • No Flickering or Artifacts
  • Per Player Scoreboards for the Sidebar and Player Tab List
  • Compatible with 1.8.8, 1.12.2, 1.14.4, 1.15.2 and 1.16.1
  • Updating Title
  • Scrolling Text Elements
  • Changeable Text Elements
  • Support for Placeholders; Placeholder API and MaximVDW
  • Tab Completion for all Commands
  • Fully Configurable Scoreboards: Control Visibility by World Names
  • Fully Configurable Teams for the Player Tab List, which can change based upon the board displayed
  • Scoreboards can be created and configured using Commands
  • Multiple Scoreboards for the Same World
  • An API for Interacting with Scoreboards and Creating Temporary Scoreboards

Commands and Permissions

All quickboardx commands can be accessed using /quickboardx or either of the aliases: /qbx or /qb I recommend using LuckPerms to manage your permissions.

Install LuckPerms

Then Use the following commands from your server console

lp creategroup admins
lp group admins parent set default
lp group admins permission set quickboardx.*
lp group default permission set scoreboard.default

Add yourself to the admins group

lp user your_username parent set admins

(Optional) OR create a Track for easy promotion and demotion

lp createtrack roles
lp track roles append default
lp track roles append admins
lp user your_username promote roles

To give your admin group the ability to use luckperms commands in game

lp group admins permission set luckperms.*


Commands

Any command that has a scoreboard for a parameter will require the name of the scoreboard's config file, without the extension.

For example, to set your visible scoreboard to the default scoreboard you would use /qbx set scoreboard.default

All parameters in <brackets> are required

Name Parameters Aliases Permission Description
/qbx None None None Shows all commands and summaries for each
/qbx check None None quickboardx.check Displays a list of the available Scoreboards, whether you have permission and if you are in one of its enabled worlds
/qbx toggle None tog quickboardx.toggle Toggle your scoreboard's visibility
/qbx next None None quickboardx.toggle Select the next available scoreboard from the list of accessible boards.
/qbx prev None None quickboardx.toggle Select the previous scoreboard from the list of accessible boards.
/qbx on None None quickboardx.toggle Enable your scoreboard.
/qbx reload None rl quickboardx.reload Reload the configuration files for QuickBoardX.
/qbx set <scoreboard> s quickboardx.set Sets the visible scoreboard for a player, using the board's name (permission).
/qbx select <scoreboard> sl quickboardx.select Switch to the selected scoreboard from the list of accessible boards.
/qbx create <scoreboard> c quickboardx.create Create a scoreboard with the provided name (permission).
/qbx addtitle <scoreboard> <line_number> <text> at quickboardx.edit Add a line to a Scoreboard's Title.
/qbx removetitle <scoreboard> <line_number> rt quickboardx.edit Remove a line from a Scoreboard's Title.
/qbx inserttitle <scoreboard> <line_number> <text> it quickboardx.edit Insert a line into a Scoreboard's Title.
/qbx addline <scoreboard> <line_number> <text> al quickboardx.edit Add a line to a Scoreboard's Text.
/qbx removeline <scoreboard> <line_number> rl quickboardx.edit Remove a line from a Scoreboard's Text.
/qbx insertline <scoreboard> <line_number> <text> il quickboardx.edit Inserts a line into a Scoreboard's Text.
/qbx list None ls quickboardx.info View a list of all available scoreboards.
/qbx listworlds None lsw quickboardx.info List the Enabled Worlds for a Scoreboard.
/qbx addworld <scoreboard> <world> aw quickboardx.edit Add a world to the enabled worlds for a Scoreboard.
/qbx removeworld <scoreboard> <world> rw quickboardx.edit Remove a world from the enabled worlds for a Scoreboard.
/qbx check_team None t_check quickboardx.check Displays your current Player Tab List team based upon your active Scoreboard, and whether the team is applied for that scoreboard
/qbx list_teams None lst quickboardx.info View the list of all Player Tab List teams.
/qbx show_team None t_show quickboardx.check Shows the configuration for your Player Tab List team.

Scoreboards

QuickBoardX allows for the customization of both the Sidebar Slot and the Player Tab List. This is accomplished by creating per player Scoreboards which define the contents in the Sidebar and Tab List. The permission required to see a scoreboard comes from the name of the scoreboard's configuration file.

For example, the default scoreboard configuration file is scoreboard.default.yml, the permission required to see the default scoreboard is scoreboard.default

Teams

The default Player Tab List team definition is in teams/teams.default.yml. You can add additional teams to the config.

The properties for each team defined in the config match up with those defined by the Spigot API which is based upon how they are defined in Vanilla Minecraft.

When defining a color for a team prefix or suffix, you must use a color code, preceded by an &; make sure to include the reset color code at the end of the prefix (&r), otherwise the color might will be applied to the player's name.

The color property for a team applies to all player names that have been added to that team.

enabledScoreboards The defined teams will only apply to the QuickBoardX Scoreboards in this list. applyToAllScoreboards All Scoreboards defined by QuickBoardX will use the teams defined in the config.

For further details about Scoreboard Teams in Minecraft and the Spigot API for Scoreboard teams check out the following links:

Gamepedia Scoreboard Teams

How-to: Create Scoreboard Teams for Dummies

Spigot Javadocs

Placeholders

Want to use placeholders in your scoreboards? Then follow the steps below to get started!

Placeholder API
  1. Download Placeholder API
  2. Install in your plugins directory
  3. Restart
  4. To use the placeholders in the default scoreboard, install the Server and Player extensions.
    1. /papi ecloud download Server
    2. /papi ecloud download Player
    3. /papi reload
    4. /qbx reload
  5. To learn more about PlaceholderAPI (Papi), visit their Discord!
MaximVdw Placeholders
  1. Install a plugin that uses Maxim Placeholders
  2. Download and install mvdwplaceholderapi
  3. Reference one of the placeholders in a Scoreboard's config: {the_placeholder_name}

API

The API provides plugin developers with methods for creating custom sidebar scoreboards, both permanent and temporary. Temporary boards will only be displayed for a short time. Using Scrollable or Changeable elements should not be used in temporary scoreboards. Methods have been included for referencing existing scoreboard configuration files. Those methods allow you to access the lists of text and titles already defined in that scoreboard's configuration file.

In addition to the Sidebar scoreboard, the Player Tab List can be customized per player. Whenever a player joins the server they will be added to the default team defined in the default team config file. The recommended way to change a player's team is to call the PlayerTeamUpdate event and providing the player's UUID and the name of the Team that they are joining.

Maven

Artifact
<!--QuickBoardX-->
<dependency>
    <groupId>net.frostbyte.quickboardx</groupId>
    <artifactId>quickboardx-core</artifactId>
    <version>1.2.0-SNAPSHOT</version>
</dependency>

CloudRepo.io

CloudRepo.io allows open source projects to use their services at no cost. They provide Public, Private and Proxy Repositories

Maven Repositories
<!-- frost-byte snapshots -->
<repository>
    <id>io.cloudrepo.snapshots</id>
    <url>https://frostbyte.mycloudrepo.io/public/repositories/snapshots</url>
</repository>
<!-- frost-byte releases -->
<repository>
    <id>io.cloudrepo</id>
    <url>https://frostbyte.mycloudrepo.io/public/repositories/releases</url>
</repository>
plugin.yml
depend: [QuickBoardX]

QuickBoardX API

Example Usage
package net.frostbyte.quickboardx.api.example;

import org.bukkit.plugin.java.JavaPlugin;

import net.frostbyte.quickboardx.api.QuickBoardAPI;

public class APIExample extends JavaPlugin implements Listener {
    @Override
    public void onEnable()
    {
        RegisteredServiceProvider<QuickBoardAPI> boardProvider = serviceManager.getRegistration(QuickBoardAPI.class);

        // The QuickBoard API
        QuickBoardAPI boardAPI;

        if (boardProvider != null) {
            boardAPI = boardProvider.getProvider();

            if (boardAPI != null) {
                new BukkitRunnable()
                {
                    @Override
                    public void run()
                    {
                        // Create a Temporary Board for each player online
                        for (Player p : Bukkit.getServer().getOnlinePlayers())
                        {
                            List<String> title = new ArrayList<>();
                            title.add("> Temp Title <");
                            title.add("> Temp Titl <");
                            title.add("> Temp Tit <");
                            title.add("> Temp Ti <");
                            title.add("> Temp T <");
                            title.add("> Temp  <");
                            title.add("> Temp <");
                            List<String> lines = new ArrayList<>();
                            lines.add("line 1");
                            lines.add("");
                            lines.add("%player_name%");
                            lines.add("");
                            lines.add("line 5");
                            lines.add("");
        
                            boardAPI.createTemporaryBoard(
                                p.getUniqueId(),
                                "scoreboard.temp",
                                title,
                                lines,
                                6,
                                2
                            );
                        }
                    }
                }.runTask(plugin);

                // Register your Plugin as a Listener, so it can respond to the PlayerJoinEvent
                PluginManager pm = getServer().getPluginManager();
        
                pm.registerEvents(
                    this,
                    this
                );
            }
        }
    }

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event)
    {
        if (event == null)
            return;
    
        // Assign the player to a team in the Player List.
        // The team can be based upon a permission, for example, a luckperms group.
        // This also requires you to have the team defined in a team configuration
        // in your QuickBoardX plugin folder (plugins/QuickBoardX/teams/team.default.yml)
        // Assuming that your own method for determining a player's team is called getPlayerTeam...
        String teamName = getPlayerTeam(event.getPlayer());
    
        // Tell QuickBoardX to update each Online Player's Player List to
        // show the player as a member of the team.
        Bukkit.getPluginManager().callEvent(
            new PlayerTeamUpdateEvent(
                player.getUniqueId(),
                teamName
            )
        );
    }
}

Links

Source Code

Github Repository
CloudRepo Maven Repository - Releases
CloudRepo Maven Repository - Snapshots

Acknowledgements

Thanks to the_TadeSK for the creation of QuickBoard; the plugin that QuickBoardX is based upon.

Discord

For support please contact me on the frost-byte central Discord!

About

A free Minecraft scoreboard plugin for Spigot/Paper

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages