Ranker
Usage and Scalability
Ranker can automatically run commands to give players rewards/permissions based on their performance/stat (pvp, pve, time, and wealth) that satisfy requirements defined by server Ops/Admins. With absolutely no configuration, Ranker works as a light-weight and simple stats tracker. Ranker's features and functions depends on the data in config.yml. Unlock as much or as little features and functions as you wish. Add Vault.jar and Ranker will use your server's economy currency as a stat. Define requirements, rewards, custom messages and commands and ranker works automatically. Set commands to do anything including grant players permissions, powers, items, and/or other rewards. Ops/Admins can control Ranker completely from within the game using commands. Commands can also provide feedback of current values in config.yml. Players and Console can display both online and offline player stats as well as modify them.
Ranker config.yml
Ranker's typical config.yml is organized into the following root sections:
- autorank - contains the ranks, requirements, rewards, messages, and commands
- stats - contains the appearance of of /ranker stats
- chatformat - contains the appearance of each rank title
- general - ranker chat mode, debug mode, How Ranker affect operators
- mysql - MySQL support for synchronizing player stats to database
Simple Config.yml Example
autorank: world: Peon: rankupcommand1: server:/perm player setgroup {PLAYER} {RANK} requirement: money=10 Citizen: rankupcommand1: server:/perm player setgroup {PLAYER} {RANK} requirement: money=20 stats: line2: ' &3{RANK} &2{PLAYER}' chatformat: Peon: '&a{RANK} {PLAYER}&3: &9' Citizen: '&a{RANK} {PLAYER}&3: &9' general: debug: false chat: false operator: false mysql: enable: false ip: 127.0.0.1 username: root password: password port: 3306 database: minecraft table: ranker update: 45 keepalive: true
Extended Config.yml Example
general: chat: false debug: false operator: false mysql: enable: false ip: 127.0.0.1 username: root password: password port: 3306 database: minecraft table: ranker update: 45 keepalive: true autorank: world: Peon: rankupmessage1: '&8--------------------------------------------' rankupmessage2: ' You earned Peon rank!' rankupmessage3: '&8--------------------------------------------' rankdownmessage1: '&8--------------------------------------------' rankdownmessage2: ' You ranked down to Peon rank!' rankdownmessage3: '&8--------------------------------------------' rankupcommand1: server:/perm player setgroup {PLAYER} {RANK} rankupcommand2: server:/perm reload rankupcommand3: server:/give {PLAYER} wood 100 rankupcommand4: server:/give {PLAYER} dirt 100 rankdowncommand1: server:/perm player setgroup {PLAYER} {RANK} rankdowncommand2: server:/perm reload rankdowncommand3: server:/give {PLAYER} wood 1 rankdowncommand4: server:/give {PLAYER} dirt 1 rewardinfo: '100 stacks of wood, dirt, and some new commands!' requirement: money=0 Citizen: rankupcommand1: server:/perm player setgroup {PLAYER} {RANK} rankupcommand2: server:/perm reload rankupcommand3: server:/give {PLAYER} wood 100 rankupcommand4: server:/give {PLAYER} stone 100 rankupmessage1: '&8--------------------------------------------' rankupmessage2: ' You earned Citizen rank!' rankupmessage3: '&8--------------------------------------------' rankdownmessage1: '&8--------------------------------------------' rankdownmessage2: ' You ranked down to Citizen rank!' rankdownmessage3: '&8--------------------------------------------' rankdowncommand1: server:/perm player setgroup {PLAYER} {RANK} rankdowncommand2: server:/perm reload rankdowncommand3: server:/give {PLAYER} wood 1 rankdowncommand4: server:/give {PLAYER} dirt 1 requirement: money=1000 Recruit: requirement: money=2000 rankupcommand1: server:/perm player setgroup {PLAYER} {RANK} rankupcommand2: server:/perm reload rankupcommand3: server:/give {PLAYER} wood 100 rankupcommand4: server:/give {PLAYER} stone 100 rankupcommand5: server:/give {PLAYER} stonesword 1 rankupmessage1: '&8--------------------------------------------' rankupmessage2: ' You earned Recruit rank!' rankupmessage3: '&8--------------------------------------------' rankdownmessage1: '&8--------------------------------------------' rankdownmessage2: ' You ranked down to Recruit rank!' rankdownmessage3: '&8--------------------------------------------' rankdowncommand1: server:/perm player setgroup {PLAYER} {RANK} rankdowncommand2: server:/perm reload rankdowncommand3: server:/give {PLAYER} wood 1 rankdowncommand4: server:/give {PLAYER} dirt 1 world_the_end: Peon: rankupmessage1: '&8--------------------------------------------' rankupmessage2: ' You earned Peon rank!' rankupmessage3: '&8--------------------------------------------' rankdownmessage1: '&8--------------------------------------------' rankdownmessage2: ' You ranked down to Peon rank!' rankdownmessage3: '&8--------------------------------------------' rankupcommand1: server:/perm player setgroup {PLAYER} {RANK} rankupcommand2: server:/perm reload rankupcommand3: server:/give {PLAYER} wood 100 rankupcommand4: server:/give {PLAYER} dirt 100 rankdowncommand1: server:/perm player setgroup {PLAYER} {RANK} rankdowncommand2: server:/perm reload rankdowncommand3: server:/give {PLAYER} wood 1 rankdowncommand4: server:/give {PLAYER} dirt 1 rewardinfo: '100 stacks of wood, dirt, and some new commands!' requirement: money=0 Citizen: rankupcommand1: server:/perm player setgroup {PLAYER} {RANK} rankupcommand2: server:/perm reload rankupcommand3: server:/give {PLAYER} wood 100 rankupcommand4: server:/give {PLAYER} stone 100 rankupmessage1: '&8--------------------------------------------' rankupmessage2: ' You earned Citizen rank!' rankupmessage3: '&8--------------------------------------------' rankdownmessage1: '&8--------------------------------------------' rankdownmessage2: ' You ranked down to Citizen rank!' rankdownmessage3: '&8--------------------------------------------' rankdowncommand1: server:/perm player setgroup {PLAYER} {RANK} rankdowncommand2: server:/perm reload rankdowncommand3: server:/give {PLAYER} wood 1 rankdowncommand4: server:/give {PLAYER} dirt 1 requirement: money=1000 King: requirement: money=2000 rankupcommand1: server:/perm player setgroup {PLAYER} {RANK} rankupcommand2: server:/perm reload rankupcommand3: server:/give {PLAYER} wood 100 rankupcommand4: server:/give {PLAYER} stone 100 rankupcommand5: server:/give {PLAYER} stonesword 1 rankupmessage1: '&8--------------------------------------------' rankupmessage2: ' You earned King rank!' rankupmessage3: '&8--------------------------------------------' rankdownmessage1: '&8--------------------------------------------' rankdownmessage2: ' You ranked down to King rank!' rankdownmessage3: '&8--------------------------------------------' rankdowncommand1: server:/perm player setgroup {PLAYER} {RANK} rankdowncommand2: server:/perm reload rankdowncommand3: server:/give {PLAYER} wood 50 rankdowncommand4: server:/give {PLAYER} dirt 50 stats: line1: '&8--------------------------------------------' line2: ' &3{RANK} &2{PLAYER}' line3: '&6 {PVP} &aplayers killed!' line4: ' &6{PVE} &amonsters/animals killed.' line5: ' &6{TIME} &aminutes played.' line6: ' &6${MONEY} &ain wealth.' line7: '&8--------------------------------------------' chatformat: Peon: '&a{RANK} {PLAYER}&3: &9'
Ranker Commands allows Complete Control over config.yml
The following are 2 examples of defining requirement(s) for the Peon rank
- description: (player must have atleast $1000 AND a pvp score of 4)
- command: /ranker worldName.Peon.requirement money=1000+pvp=4
- description: (player must have atleast $1000 AND a pvp score of 4) OR (have playtime of atleast 120 minutes) OR (have killed atleast 50 monsters) OR (have killed atleast 30 players)
- command: /ranker worldName.Peon.requirement money=1000+pvp=4;time=120;pve=50;pvp=30
More on how to Modify config.yml by Commands
Command parameter corresponds directly to the format within the config.yml file. The following demonstrates a sequence of changes to the config.yml with each command used. Also Note Below: Ranker displays the current value of the config node if no value parameters are included!
- permission node: ranker.* (default: op)
- command: /ranker autorank.world.Peon.rankupcommand1 server:/give {PLAYER} wood 100
autorank: world: Peon: rankupcommand1: server:/give {PLAYER} wood 100
- command: /ranker autorank.world.Peon.rankupmessage2 ' You earned Peon rank!'
autorank: world: Peon: rankupcommand1: server:/give {PLAYER} wood 100 rankupmessage2: ' You earned Peon rank!'
- command: /ranker autorank.world.Peon.requirement time=0
autorank: world: Peon: rankupcommand1: server:/give {PLAYER} wood 100 rankupmessage2: ' You earned Peon rank!' requirement: time=0
- command: /ranker autorank.world.Peon.requirement
- displays: (existing) time=0
- command: /ranker autorank.world.Peon.requirement remove
autorank: world: Peon: rankupcommand1: server:/give {PLAYER} wood 100 rankupmessage2: ' You earned Peon rank!'
Commands
/ranker list description: list all ranks, requirements, and rewards within a world. /ranker stats description: show stats /ranker stats <player> description: show stats of <player> /ranker autorank.<worldName>.<rankName>.<options> <values> description: edit autorank data in config.yml /ranker chatformat.<rankName> <values> description: edit chatformat in config.yml /ranker stats.line<1-8> <values> description: edit stats format in config.yml /ranker save-all description: saves all player's stats to server before a /reload /ranker general.chat <true|false> description: turn Ranker chat mode on/off. /ranker general.debug <true|false> description: turn Ranker debug mode on/off. /ranker general.operator <true|false> description: include/exclude operators from calling Ranker's messages/commands, (false prevents operators from getting downranked) /ranker reset <player> rank description: reset player rankName /ranker reset <player> <pvp|pve|time> <value> description: reset player stats to specified value. /ranker give <player> <pvp|pve|time> <value> description: add value to specified player stats. /ranker import autorank description: imports autorank player's time into Ranker playerData
Permissions
ranker.*: description: Allow use of op commands. default: op children: ranker.stats.self: true ranker.stats.other: true ranker.list: true ranker.save.all: true ranker.stats.self: description: Show my stats. ranker.stats.other: description: Show other player's stats. ranker.list: description: List the ranks, requirements, and rewards within a world. ranker.command.rankup: description: Call rank commands when rank up to that rank. ranker.command.rankdown: description: Call rank commands when rank down to that rank ranker.message.rankup: description: Call rank messages when rank up to that rank. ranker.message.rankdown: description: Call rank messages when rank down to that rank. ranker.rankup: description: Change your rank when you rank up. Setting this to false will disable both message and command. ranker.rankdown: description: Change your rank when you rank down. Setting this to false will disable both message and command. ranker.save.all: description: Allow player to save all player's stats to server.
Player and Server Command Example
- command: /ranker autorank.world.Peon.rankupcommand1 server:/give {PLAYER} wood 100
- description: console server will send the command
- command: /ranker autorank.world.Peon.rankupcommand2 player:/me just ranked!
- description: the player will send the command
Mechanics with Permissions
- permission node: ranker.command.rankup (default: op)
- description: Call rank commands when rank up to that rank.
- permission node: ranker.command.rankdown (default: op)
- description: Call rank commands when rank down to that rank
- permission node: ranker.message.rankup (default: op)
- description: Call rank messages when rank up to that rank.
- permission node: ranker.message.rankdown (default: op)
- description: Call rank messages when rank down to that rank.
-
View User Profile
-
Send Message
Posted Jan 15, 2013I have a rank which is earned after 30 minutes online, and people are earning it multiple times. I was assuming it was not possible to be de-ranked from that, since they can't lose play time, so I'm a little confused as too how they're getting it multiple times.
Are they simply earning it every 30 minutes they play?
-
View User Profile
-
Send Message
Posted Jan 14, 2013@goldftwcom
Yeah they don't have either of those permission nodes. They are not technically getting down ranked it seems as when it sees a player as the proper requirements for a certain rank it "promotes" them to that rank. Our current setup is like this for example;
Peon: Money $5000 & PVP 5 kills Grunt: Money $25000 & PVP 20 kills (more ranks but showing these two as an example)
If a player is promoted to a grunt upon getting $25,000 in their total balance. If they store that amount into a bank and then get $5,000 from selling goods or someone gives them the money it registers them as getting the requirement for Peon and "promotes" them to Peon even though they were already a Grunt.
-
View User Profile
-
Send Message
Posted Jan 14, 2013@Arkatetk
If you don't want players to get demoted, make sure they or the default rank does not have the permission nodes:
(note that /ranker stats will still display the most current rank) Perhaps I can add another variable such as {highestrank} option to be used in the stats format.
-
View User Profile
-
Send Message
Posted Jan 14, 2013Is there anyway to prevent players from being "demoted" when they have the required money for a rank lower than they already are? For example; If Peon requires $1000 and Soldier requires $5000. Once the player has $5000 they are promoted to Soldier if they are already Peon. However, if they bank that cash or spend it and go below $1000. Once they go above $1000 but less than $5000 it "promotes" them back to Peon.
There isn't anyway around this?
-
View User Profile
-
Send Message
Posted Jan 13, 2013@Ducky_333
Ohhh. Lovely! Thank you :)
I just noticed that you got that from the original post. It's kind of messy so I must have missed it :O
-
View User Profile
-
Send Message
Posted Jan 13, 2013@CreepCraft
example
command: /ranker autorank.world.Peon.requirement money=1000;pvp=10+pve=10 description: To earn Peon rank within the world called world, player must have atleast $1000 OR (killed 10 players AND killed 10 animals/monsters).
so, put '+' between the two requirements and they must have both to earn the rank.
-
View User Profile
-
Send Message
Posted Jan 13, 2013It didn't say anywhere, but can I assign both time AND money requirements?
-
View User Profile
-
Send Message
Posted Jan 13, 2013Thank you very much, it's all working perfectly now.
-
View User Profile
-
Send Message
Posted Jan 12, 2013Does this work with bPermissions?
-
View User Profile
-
Send Message
Posted Jan 12, 2013Ranker Beta 1.2.3.2's permission nodes were left out during PEX testing.
Ranker Beta 1.2.4 Now fixed. Ranker should be working properly to include/exclude normal players from calling messages and commands via permission nodes:
To include/exclude operators from calling messages and commands use:
Thanks for reporting bugs! It's possible that Ranker can be changed to work with your server requirements so thanks for the suggestions.
-
View User Profile
-
Send Message
Posted Jan 12, 2013Ah okay, I guess this isn't quite the plugin I'm after. not until that update happens, at the least.
I also have donator ranks, which are earned through buycraft when a player donates, and they get removed when the player hits one of the requirements for the ranker ranks. So a permission to negate the gaining of ranks through ranker would be the ideal thing for my donator and staff ranks.
-
View User Profile
-
Send Message
Posted Jan 11, 2013@miningcraftlt
Thanks for reporting the error to me, I'll patch it up.
-
View User Profile
-
Send Message
Posted Jan 11, 2013Hey, i'm getting some errors, take a look :) http://pastebin.com/F2QdGEQf Btw. everything is working fine i think, just an error.
-
View User Profile
-
Send Message
Posted Jan 11, 2013@Ducky_333
PermissionsEx's design somehow feels it should grant all operators all permission nodes. I'm not absolutely sure the cause of this problem, but I'm sure Ranker doesn't have this problem with other permission plugins such as PermissionsBukkit. Due to popular request, I will add a set of options to allow excluding players from some of the mechanics of Ranker.
-
View User Profile
-
Send Message
Posted Jan 11, 2013It's possible that I'm just missing it, but is there a way to make certain ranks/groups in your permissions plugin not effected by this?
I'm using PermissionsEX, and don't want my staff to be set to any of the ranks i have set up through this plugin if/when they hit a requirement.
Thanks
-
View User Profile
-
Send Message
Posted Jan 9, 2013Ranker Beta 1.2.3.2 is out, hopefully this will be the last Beta release. Please report bugs though. Thanks
-
View User Profile
-
Send Message
Posted Jan 9, 2013Found a small minor bug in Ranker Beta 1.2.3.1 where if someone leaves, ranker's core function stops working. This is an easy fix!
-
View User Profile
-
Send Message
Posted Jan 8, 2013@lucky___13
Thanks, if it continues to run stable I'll release Ranker by the end of the week.
-
View User Profile
-
Send Message
Posted Jan 8, 2013@goldftwcom
Excellent work, thanks!
-
View User Profile
-
Send Message
Posted Jan 7, 2013@lucky___13
Ranker Beta 1.2.3 has a fix for it. Thanks for reporting bugs.
Changes to fix incompatibility issues with PEX permission plugin, should work with all other permission plugin.