HomeJavaModsMCMMO XP Bar
MCMMO XP Bar
[​IMG]

A small addon for MCMMO. Made for my own server back in 1.7.x, now updated to work on 1.9 (will not work on earlier versions) and given a public release. Using this plugin on versions earlier than 1.9 is not supported and will cause errors.

Installation:
  1. Drop the plugin in your plugins folder.
  2. Use a permissions plugin to give users either the "xpbar.use" permission or a parent permission such as "xpbar.user". I would suggest "xpbar.user" as it will grant use of the basic commands as well the use of xp bars.
  3. Edit the list of "enabled_worlds" in the config to include the names of the worlds you want xp bars to be enabled in.
  4. Customize the default settings, the message to display above the bar and other settings in the generated config.yml file.

If you want to allow users to further customise their own xp bars instead of using the server's default that you've defined in the config file, then you can give them "xpbar.style" and/or "xpbar.color" permissions too.

Features:

Displays on-screen xp bars when you gain xp in mcMMO skills.

Configuration:
Spoiler
plugins/MCMMOXPBar /config.yml

The config file will generate automatically when the server starts.
Players' setting are also stored in this file.
  • enabled_worlds
    • list of worlds where xp bars should be enabled
    • defaults:
      • world, world_nether, world_the_end
  • save_data_on_modify
    • true/false
    • whether to save the config file every time a setting is updated. When false, the config file will only be updated when the server shuts down.
    • default: false
  • xp_bar_default_enabled
    • true/false
    • whether xp bars are enabled for all players by default
    • default: true
  • xp_bar_default_timeout
    • integer
    • the default number of seconds xp bars will stay on screen for
    • default: 10
  • xp_bar_default_count
    • integer (greater than zero)
    • the default number of xp bars that can be displayed at once
    • default: 2
  • xp_bar_max_timeout
    • integer
    • the maximum time in seconds that players may set their timeout to
    • default: 30
  • xp_bar_default_style
    • 1, 6, 10, 12 or 20
    • Set the default bar style, if you do not give users the xpbar.style permission they will be forced to use the default if they haven't previously changed their style.
    • default: 1
  • xp_bar_default_color
    • pink, blue, red, green, yellow, purple or white
    • Set the default bar color, if you do not give users the xpbar.color permission they will be forced to use the default if they haven't previously changed their color.
    • default: green
  • xp_bar_message
    • This is the message that will be displayed above xp bars, you can use special phrases to insert relevant text and formatting codes to change the text's appearance by using the & character where you would use a § character normally.
    • The above image for example, uses '&a&l$skillname$&r - &9$xpremaining$&rxp until level &3$skillnextlevel$&r [&7+$xpgained$&r]' (the single quotes are required in this case, as the text contains some special characters that would confuse the plugin otherwise)
    • $skillname$ - Name of the MCMMO skill, this should be localized if you're using a different locale for MCMMO.
    • $skillcurrentlevel$ - Your current level in the skill
    • $skillnextlevel$ - The level you are working towards
    • $xpcurrent$ - The xp you've earned since the start of your current level
    • $xpatlevelup$ - The xp required to go from the start of your current level to the next level
    • $xpgained$ - The xp you earned from your most recent action
    • $xpbefore$ - The xp you had before your most recent action
    • $xpremaining$ - The xp remaining until you level up
    • $progresspercentage$ - The percentage showing your progress towards your next level
    • default:
      • '$skillname$ (Level $skillcurrentlevel$ : $xpcurrent$/$xpatlevelup$)'
Permissions:
Spoiler
  • xpbar.enable:
    • Gives access to enabling your own xp bar
  • xpbar.disable:
    • Gives access to disabling your own xp bar
  • xpbar.timeout:
    • Gives access to setting your own xp bar timeout
  • xpbar.save:
    • Gives access to saving the current xp bar user settings to file
  • xpbar.load:
    • Gives access to reloading all config from file
  • xpbar.worlds:
    • Gives access to listing the currently enabled worlds
  • xpbar.use:
    • Required for you to use an xp bar
  • xpbar.count:
    • Gives access to setting the maximum number of xp bars to be displayed at once
  • xpbar.style
    • Lets users change the style (segments) of their xp bars
  • xpbar.color
    • Lets users change the color of their xp bars
Parent permissions:
This permissions will
  • xpbar.toggle
    • xpbar.enable
    • xpbar.disable
  • xpbar.user
    • xpbar.toggle
    • xpbar.use
    • xpbar.count
    • xpbar.timeout
  • xpbar.admin (granted to ops by default)
    • xpbar.user
    • xpbar.save
    • xpbar.load
    • xpbar.worlds
    • xpbar.style
    • xpbar.color
Commands:
Spoiler
  • /xpbaron - enable your xp bars - xpbar.enable
  • /xpbaroff - disable your xp bars - xpbar.disable
  • /xpbartoggle - toggle your xp bars on/off - xpbar.toggle
  • /xpbartimeout <seconds> - set how long your xp bars stay on screen for - xpbar.timeout
  • /xpbarsave - save any changes to the config file - xpbar.save
  • /xpbarload - reload the config from the config file - xpbar.load
  • /xpbarworlds - list the worlds xp bars are enabled on - xpbar.worlds
  • /xpbarcount <integer> - set how many xp bars can be on your screen at once - xpbar.count
  • /xpbarstyle <1/6/10/12/20/default> - xpbar.style
  • /xpbarcolor <pink/blue/red/green/yellow/purple/white/default> - xpbar.color
Caveats:
Spoiler
  • Minecraft limits the number of boss bars that can be on screen at any time, based on the scale of your GUI and the size of your game's window. If you set your count higher than what minecraft will display, not all the bars will work properly. Though this won't often happen unless you have the bars set to display indefinitely or for a long time.
  • The $xpgained$ phrase will display zero when the xp you gained was enough to advance to the next level. I'm not sure why this happens; something to look into in the future.
Other Screenshots:
Spoiler
[​IMG]

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

MCMMO XP Bar is a free Minecraft Java mod. Compatible with Minecraft 1.9, 1.10. Downloaded 2,215 times (via Spigot). Download it and open it directly in the game.

Explore more