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.
@l121ptv
link your config.
2013-03-26 18:52:14 [INFO] vanderwulff issued server command: /tpaccept 2013-03-26 18:52:15 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed by the driver. 2013-03-26 18:52:15 [SEVERE] at sun.reflect.GeneratedConstructorAccessor83.newInstance(Unknown Source) 2013-03-26 18:52:15 [SEVERE] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 2013-03-26 18:52:15 [SEVERE] at java.lang.reflect.Constructor.newInstance(Constructor.java:525) 2013-03-26 18:52:15 [SEVERE] at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) 2013-03-26 18:52:15 [SEVERE] at com.mysql.jdbc.Util.getInstance(Util.java:382) 2013-03-26 18:52:15 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013) 2013-03-26 18:52:15 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987) 2013-03-26 18:52:15 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982) 2013-03-26 18:52:15 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) 2013-03-26 18:52:15 [SEVERE] at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1213) 2013-03-26 18:52:15 [SEVERE] at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1200) 2013-03-26 18:52:15 [SEVERE] at com.mysql.jdbc.ConnectionImpl.createStatement(ConnectionImpl.java:2485) 2013-03-26 18:52:15 [SEVERE] at com.mysql.jdbc.ConnectionImpl.createStatement(ConnectionImpl.java:2467) 2013-03-26 18:52:15 [SEVERE] at com.goldftw.chaos350z.ranker.DatabaseConnection.executeSQL(Ranker.java:153) 2013-03-26 18:52:15 [SEVERE] at com.goldftw.chaos350z.ranker.DatabaseConnection$2.run(Ranker.java:265) 2013-03-26 18:52:15 [SEVERE] at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftTask.run(CraftTask.java:53) 2013-03-26 18:52:15 [SEVERE] at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) 2013-03-26 18:52:15 [SEVERE] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 2013-03-26 18:52:15 [SEVERE] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) 2013-03-26 18:52:15 [SEVERE] at java.lang.Thread.run(Thread.java:722) 2013-03-26 18:52:15 [SEVERE] Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Here :) It works, but ppl are new, so they get ./ranker stats and they have a rank when they do that :s they're not suppose to have a rank in ,/ranker stats until they reach requirement so idk why its doing that.
@goldftwcom
link to config file: https://dl.dropbox.com/u/11622029/config.yml
@ballisticknife0
Link your config.yml.
@Rickious
Any stat that can be subtracted by the average player might not work appropriately with the current Ranker. The problem with currency and stats that can be subtracted is that Ranker is designed to re-execute commands which may leave some room for abuse. I'm planning another plugin that might work better than Ranker - or maybe an addon to Ranker. Ranker works better with PVP, PVE, TIME, and even blocks placed.. data the user cannot subtract.
@l121ptv
It works in 1.5.1. Link your error.
Ranker is giving huge log error! and even i think not working properly (i got sql connected)
Could you update to 1.5.1? <3 ty.
@goldftwcom
I have both of these nodes added, and still it will not execute the /server command
Is there any way of making one global time? Not having separate time in different worlds? So time in the normal world being counted will be the same time being counted in a different world.
Any chance of adding rank up on XP level too?
@OnyxNewt
Requirement is in minutes, Ranker tracks at the seconds units. Modifying user data using /ranker give|reset will give seconds to players.
When you have the requirement set to be ranked up, is it set in days, hours, minutes, or seconds? I want my guest players to play for 1 hour then be ranked up to member.
@Arcrimonia
Link your config and permissions
@goldftwcom
Mods as OP? no way!
@Eliijah
@Arcrimonia It's in the description.
I have a nice little autoranking system on my server. But whenever I change people to a mod rank it always changes it back to their auto rank.. Any fix?
This was just what I was looking for... AND THEN SOME! Thank you so much!
Hey, I'm not sure if this is just me but for some reason I just cant get it to work properly. All the stats and everything else works great but for some reason it will not execute the /server commands.
Can I please post my config file for you to have a quick look over and see if there's something I've missed or done wrong as my server is now relying on this plugin to update everyone into there groups, and when I have someone hit 1000 pvp kills they expect it to auto add them to a group, and when it doesn't it causes massive headaches for myself.
Thanks!
DropBox link for config file: https://dl.dropbox.com/u/87764224/config.yml
@goldftwcom
Sweet ill try it out i also have a question how do you change it so that the player gets certain commands when they rank up??? sounds like a great plugin i will try it out thx!
@UraniumCraft
It's safe to test on a Tekkit server if you have one.