Rank Upper - Promote your players based on Requeriments/Statistics
Promote your players on your server based on requeriments. Actually the requeriments are:
- Time played;
- Money Earned;
- Experience (in Levels);
- You can use Sponge Statistics to track for rankup
- Now you can use MC Scoreboards
This plugin will run commands (permission commands or any command) when a player reach a specific requeriment/statistic based on configurations and existing groups in your permissions group!
Discuss with the developer online on Discord: https://discord.gg/VHTwk53
Commands and Permissions
All commands can be acessed in game using only /ru and all commands support offline players, including commands to set time, query player info and check.
Commands:
/ru check - To check own playerd time and requeriments to next rank.
/ru check [player] - To check for other player.
/ru rankup - To self rankup if done all requirements.
/ru rankup [player] - To rankup other player if the requirements is done.
/ru top - Show the top 10 table of most played on server.
/ru player-info <player> - See first join, time played, last visit and last know name.
/ru set <player> <minutes> - Set the played time of a player.
/ru add <player> <minutes> - Add time played to player.
/ru save-all - Save all stats to file.
/ru load-all - Load all stats from file.
/ru list-groups - List all group on config, with requeriments.
/ru reload - Reload the config and lang file.
/ru addgroup <group> <nextGroup> <time> <level> <money>- Add a ranked group.
/ru setgroup <group> <nextGroup> <time> <level> <money>- Change requeriments of a group.
Permissions:
rankupper.check
rankupper.check-others
rankupper.rankup
rankupper.rankup-others
rankupper.top
rankupper.player-info
rankupper.set
rankupper.add
rankupper.save-all
rankupper.load-all
rankupper.list-groups
rankupper.reload
rankupper.addgroup
rankupper.setgroup
How to use:
All configurations is on rankupper.conf, All nodes are commented.
Default configuration:
# Stop counting time when a player is AFK? (Using Nucleus' API only!)
# Setting this true without Nucleus (0.23.1+) installed will result in player's time not being counted.
afk-support=false
# Players need to use the command /ru check to rankup or let automatic?
auto-rankup=true
# Players need to use the command /ru rankup to rankup or /ru check will do this?
check-rankup=true
database {
prefix="ru_"
# The default uri is: "jdbc:h2:playerstats.db;mode=Mysql"
uri="jdbc:h2:%s/playerstats.db;mode=Mysql"
}
# Save to database every X minutes.
database-save-interval=5
# Date format to save data info of players.
date-format="dd/MM/yyyy"
# Enable debug messages?
debug-messages=false
# List of groups which will not be considered when checking for possible rank up scenarios.
exclude-groups=[
"staff_group",
"donor_group"
]
# Save to file every X minutes.
flat-file-save-interval=20
# Available languages: EN-US, PT-BR
language=EN-US
# IMPORTANT: Change from "default" to exact group name the player need to is in to be promoted to next group
ranked-groups {
group-example {
# Commands to execute when promote. These commands will depend on your permission plugin.
# Available placeholders: {player}, {oldgroup}, {newgroup}
execute-commands=[
"lp user {player} parent unset {oldgroup}",
"lp user {player} parent set {newgroup}",
"xp 50L {player}"
]
# Levels(not experience) needed to promote.
levels-needed=50
# Broadcast the promote messsage to all players.
# Available placeholders: {player}, {time}, {newgroup}
message-broadcast="&a>> The player &6{player} &ahas played for &6{time} &aand now is rank {newgroup} of server."
# Use some Minecraft Statistics to track for rankup.
# This option will only accept LONG types for statistics.
# See all statistics names here: https://jd.spongepowered.org/7.0.0/org/spongepowered/api/statistic/Statistics.html
minecraft-statistics {
"MOB_KILLS"=100
"PLAYER_KILLS"=50
}
# Use the values of your scoreboard's Scores by name to rank up players.
# Set to 0 or -1 to disable.
minecraft-scoreboards {
TeamBlue=50
}
# Minutes played needed.
minutes-needed=120
# Money needed. Do not requires additional plugin.
money-needed=1000
# Exact name of group to promote player on match the requiriments.
next-group=member
}
}
# Interval to add online player times.
update-player-time-minutes=5
# Use uuids to store players stats on playerstats.conf?
use-uuids-instead-names=true
Use this commands to add or edit your groups:
/ru addgroup <group> <nextGroup> <time> <level> <money>- Add a ranked group.
/ru setgroup <group> <nextGroup> <time> <level> <money>- Change requeriments of a group.
Or follow these steps:
- Copy the contents of “group-example” and make your changes;
- Change the requeriments for each group section you add;
- Add as many commands you want to run on promote;
- Add minecraft statistic based on name in this page: https://jd.spongepowered.org/7.0.0/org/spongepowered/api/statistic/Statistics.html
- The name of section configuration need to be the group name the player need to be in to be promoted to next-group;
- The player will be promoted/group changed by the command set on “execute-commands” option. This is a list of commands;
- The commands can vary with the plugins you is using;
- Use {player} to add the player name, and {oldgroup}/{newgroup} to use the player group and next group names on commands;
- To do not use broadcast message, set to "" (empty) string;
PlaceholdersAPI
Download: https://ore.spongepowered.org/rojo8399/PlaceholderAPI
Available placeholders for PlaceholderAPI (the results are examples of what each placeholder returns):
%rankupper-joindate%
- Join date - Result:01/01/2020
%rankupper-lastvisit%
- Last visit - Result:01/01/2020
%rankupper-timeplayed-formated%
- Time played formated - Result:10 day(s), 10 hour(s) and 10 minute(s)
%rankupper-timeplayed-days%
- Total days played - Result:10
%rankupper-timeplayed-halfhours%
- Hours played limited to 24 hours - Result:10
%rankupper-timeplayed-fullhours%
- Total hours played up to 24 hours - Result:26
%rankupper-timeplayed-halfminutes%
- Minutes played limited to 60 minutes - Result:30
%rankupper-timeplayed-fullminutes%
- Total minutes played up to 60 minutes - Result:66