+ Added Time based ranks.(Requested)
+ Added TimedRanks.yml
+ Added a Connection Gui(More on this later)
* Updated the command /bcr setitem to now listen to: /bcr setitem (timed/custom/placeholder) *Default placeholder if no input given*
* Updated the config.yml to feature the new settings:
Code (Text):
Settings:
inventory-size: 27
timed-size: 27
hide-completed: true #Hides all tasks (not the bar) when all section tasks are completed
hide-complete-single: false #Hides a single completed task from showing(Better for when ranks have many requirements)
title-section: '&a&m=====&6{0} Statistics&a&m====='
use-normal-ranks: true
use-timed-ranks: true
time-check-in-seconds: 300
Core-Settings:
time:
days: 'Days '
hours: 'Hours '
minutes: 'm '
seconds: 's'
Messages:
not-enough-mcmmo: '&4You need to train more mcmmo!'
not-enough-cash: '&4You are lacking some money!'
not-enough-gems: '&4You are lacking some gems!'
not-enough-jobs: '&4You need a higher job power level!'
not-enough-votes: '&4You need to vote more!'
not-enough-other: '&4You are missing several other requirements...'
no-buy-permission: '&4You do not have permission to buy {0}'
buy-too-high: '&4You already own a rank equal or higher than this!'
not-enough-world-stats: '&4You need to do more in-game'
display-item-set: '&7New Display item has been created.'
use-ranks: 'Serious error occured, both normal and timed ranks are offline. Shutting down the plugin...'
Completed:
section-complete: '&2You completed everything in this section!'
other-stats: '&7[&a✔&7] {0} Level Reached.'
world: '&7[&a✔&7] You are in the correct world.'
block-placed: '&7[&a✔&7] Placed {0} blocks.'
gems: '&7[&a✔&7] Reached {0} Gems.'
jobs: '&7[&a✔&7] Reached Job Power Level {0}.'
mcmmo: '&7[&a✔&7] Reached Mcmmo {0} Level {1}.'
quests-points: '&7[&a✔&7] Reached {0} quest points.'
quests-completed: '&7[&a✔&7] Completed {0} quests.'
vault: '&7[&a✔&7] Money: {0}.'
votes: '&7[&a✔&7] Votes: {0}.'
The timed ranks are limited to time only, however the api has been updated to allow outside sources to still change these.
The setup permission wise is exactly the same as the bcranks original setup(Settings.yml) so a buy and no buy permission(albeit automated)
In the config servers can choose which rank system to use, either custom(perks) or timed, or both.
Incase a server has both a Gui is created to let players choose which section they want information about.
Example:
Clicking the custom rank section works as normal, it loads the rank requirements for the player, checks if they have it, both permission and set requirements(Settings.yml).
Clicking the timed ranks only shows information what that rank requires, such as time.
These cannot be interacted with and are just display items you can use to inform your users.
The lore in time ranks uses messageformat type placeholders, simply put, Similar to %s in some plugins, this is numerical based {0} {1} etc.
{0} = The players time.
{1} = The time they need for that rank
{2} = The ranks name
{3} = Do they own it or not/Can they grab it.
The RankupCheckEvent has been updated to comply with both custom and Timed ranks simultaiously.
The e.getInventory() which returns the inventory incustom ranks is null in timed, and a boolean has been added to display if the event fired, is timed or not (e.getTimed()); //Returns true|false
Dev Note:
I have not fully tested the time ranks, bugs may appear but a lot of time was spend debugging sections where possible,
If you found a bug, or a missing addition, let me know and i'll help you fix it!