I'm vyketype. This is my first public plugin: BarsOfAction. The goal of this plugin is to allow its users to create, send and save Minecraft ActionBars without any sort of difficulty.
Commands
/ab send or /ab sendnopref This command sends an ActionBar to a player. The latter sends it without the ActionBar prefix. Syntax: <targetname> <text || -get [savename]> [-sound <sound> [pitch]]
The first argument is always the name of the player who you are sending the ActionBar to.
The second argument can be either the text of the ActionBar OR an attempt to retrieve a saved ActionBar with the syntax -get <savename>. The ActionBar saving process will be explained later.
Finally, there is the sound argument, used with the syntax -sound <sound> [pitch] where the "sound" argument specifies the name of the sound in Minecraft, and the "pitch" argument, the pitch.
Example: /ab send vyketype Life is Amazing! Live long and Prosper! -sound entity.experience_orb.pickup
/ab broadcast or /ab bcnopref This command sends an ActionBar to every player online. Syntax: <text || -get [savename]> [-sound <sound> [pitch]]
The command syntax is pretty much the same as /ab send, with the sole exception being that there is no argument for specifying a target player's name.
/ab save This command saves an ActionBar in the server, which can be reused later with -get. Syntax: <text> <name>
The first argument is the text of the ActionBar.
The second argument is the name under which the ActionBar will be saved as.
/ab saverecent This command saves the previous ActionBar you sent (if any), which can be reused later with -get. Syntax: <name>
The only argument is the name under which the ActionBar will be saved as.
/ab list This command shows a list of all saved ActionBars. Syntax: [page]
There may be many pages in the list, hence the "page" argument.
/ab sendtoconsole This command toggles if sent ActionBars get also sent to console.
/ab prefix query This command tells the player what the current ActionBar prefix is (if any).
/ab prefix set This command sets a new ActionBar prefix. Syntax: <prefix>
The only argument is the new prefix.
/ab prefix remove This command removes the current ActionBar prefix (if any).
/ab perms This command displays a list of all permissions in the plugin.
/ab plugin This command displays general information about the plugin.
Permissions
Most commands require a permission to be given to the player in order to be run:
actionbar.broadcast — /ab broadcast
actionbar.broadcast.noprefix —/ab bcnopref
actionbar.consoletoggle — /ab sendtoconsole
actionbar.delete — /ab delete
actionbar.prefix — /ab prefix
actionbar.save — /ab save and /ab saverecent
actionbar.send.self — /ab send when sending an ActionBar to yourself
actionbar.send.self.noprefix — /ab sendnopref when sending an ActionBar to yourself
actionbar.send.others — /ab send when sending an ActionBar to others
actionbar.send.others.noprefix — /ab sendnopref when sending an ActionBar to others
actionbar.sound — Use the -sound argument when sending an ActionBar
Any command that was not mentioned in this list can be run by everyone, without exception.
Configuration
The included config.yml file contains three configuration points for this plugin.
Code (YAML):
# ACTIONBAR PREFIX prefix: ""
# ACTIONBAR PREFIX CHAR LIMIT prefixCharLimit: 30
# SEND TO CONSOLE sendToConsole: true
The prefix field specifies the prefix which will be displayed in ActionBars. By default, there is no prefix, however you can change this by writing directly in the config.yml file or by running the command /ab prefix.
The prefixCharLimit field specifies the maximum amount of characters the ActionBar prefix can have. By default, it is 30, and the only way that one can change this is by writing directly in the config.yml file.
The sendToConsole field specifies whether ActionBars shall also be sent to the console logs. By default, the value is true, however you can change this by writing directly in the config.yml file or by running the command /ab sendtoconsole.
Additional Credits and Thanks
the SpigotMC forums; a real lifesaver
Dynmie#1173; the very nice Config.java file in this plugin
Please leave any feedback either in the discussion section below or in my Discord server: https://discord.gg/dHyWwzcTEq