PvP Tracker
PvP Tracker
by Nanoripper
It is a simple and easy plugin to track the PvP stats and find the best PvPers of the server. You can use this to find a winner every week & month etc.
This plugin requires WorldEdit and WorldGuard
Features
- Multiverse support ( It will only keep tracking in the worlds you want, which is configurable via config.yml)
- Detailed PvP stats (Who killed whom, kill counts etc.)
- MySQL support
- Detect Cheaters
- Leaderboard Signs
- Easy reset command to clear the stats for that competing period
- PvP Tracking can be disabled in specific regions. ( Event regions, protected areas etc. configurable via config.yml)
- PvP ranks according to PvP points (fully customizable)
- Show PvP Ranks as Tags on chat (compatible with EssentialsChat and many other)
Details
Plugin tracks all PvP fights in configured zones(proper world and regions). Every kill gives 10 points and every death(by other players) takes 20 points back. So basically 2 kills = 1 death.
Plugin has a cheat detection feature. If a player kills same player more than X times(X is configurable via config.yml), player will lose all the points he got by killing that player. This feature can be used to prevent people killing same person repeatedly to earn pvp ranks.
Plugin will only track PvP in the worlds you want. You can also exclude specific WG regions in that world. (Ex: event regions)
Plugin's table on MySQL has 2 columns for kill counts. First one is to store the active kill counts of that competing period. And the second is to store the overall kill counts. When you use the reset command active kill counts will be added to overall and will be reset to 0.
The active points are used to determine the winner of that competing period. Scoreboards will also show the points for that competing period.
The overall points are to determine the PvP Ranks of users.
Rank System
You can use the plugin to give PvP Ranks to players according to their overall PvP points.
Example:
Stone=0 Coal=500 Lapis=1000 Quartz=1600 Iron=3000 Gold=5000 Diamond=8000 Emeral=11000
Rank names and required points are fully customizable via config file. Ranks will be calculated according to overall points. So using the reset command WON'T reset ranks.
Reset command is used just to finish that competing period by adding the active points to overall points and cleaning the active points.
To display the PvP Ranks on chat use {pvp_rank} variable in your Essentials ChatFormat. Example: &6[&a{pvp_rank}&6] can be added before player names to show their pvp ranks on chat.
Leaderboard Signs
Place 2 signs on the wall one below the other one. First line of the first sign must be [pvptracker]. After this is set just right click the sign and it will turn into leaderboard. (You need pvptracker.admin permission for that.)
Sign Format:
When you right click, it will turn into a leaderboard:
Commands & Permissions
- /pvptracker reload - pvptracker.admin - Reloads the plugin config.
- /pvptracker reset - pvptracker.admin - Finishes the current competing period. Adds the active period's points to overall points and clear the active points so a new competing period starts. (Scoreboards will be automatically cleared.)
- /pvptracker check - Shows the command sender his active PvP points. (not overall points)
- pvptracker.canpvp - Default permission. You can take this perm from your moderators/admins to keep them away from leaderbords. Plugin won't keep stats if this perm is taken.
- pvptracker.showpoints - Default permission. Players with this permission can have their PvP ranks displayed on chat if configured on your ChatFormat. Players without this permission will have a single letter "Y" instead of their ranks. You can also take this permission from your staff members so their PvP ranks won't be displayed on chat.
Sample Config.yml file
pvp_worlds: # Name of the worlds you want to keep track of PvP - World - Nether no_pvp_regions: # List of the region names in which plugin won't keep track of PvP stats. - eventregion - protected_region ranks: # List of your pvp ranks and required overall points for each rank. - Stone=0 - Coal=500 - Lapis=1000 - Quartz=1600 - Iron=3000 - Gold=5000 - Diamond=8000 - Emeral=11000 max_kills: 0 # This is the maximum number allowed for a player to kill the same person. If player exceeds this number, the points he got from that person won't be counted. If set to 0, feature will be disabled. mysql: #mysql database settings host: localhost port: 3306 database: dbname user: dbuser pass: dbpass stat_sign1_coord: 998 68 1004 #World and coordinates for the leaderboard signs. These will be automatically created when you create the signs. stat_sign2_coord: 998 67 1004 stat_sign_world: World
Bugs
Report any bugs you see, and I will try to fix them asap. :)
Change Log
2.2 - Some MySQL fix and 1.8.8 compatibility
2.1 - Fixed some ChatFormat Issues.
2.0 - Added rank system.
1.1 - Added maximum number of kills allowed per a user.
1.0 - This is the first version of the plugin.
I appreciate any feedback and review.
Türkmüsünüz?
Give this error (maybe no compatible with spigot hack?):
[16:27:03 ERROR]: Error occurred while enabling PvPTracker v2.2 (Is it up to date?)
java.lang.NullPointerException
at org.bukkit.Location.getChunk(Location.java:73) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
at com.nanoripper.PvPTracker.Main.updatesigns(Main.java:391) [?:?]
at com.nanoripper.PvPTracker.Main.onEnable(Main.java:66) [?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:412) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:476) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:394) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
at net.minecraft.server.v1_7_R4.MinecraftServer.n(MinecraftServer.java:360) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
at net.minecraft.server.v1_7_R4.MinecraftServer.g(MinecraftServer.java:334) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
at net.minecraft.server.v1_7_R4.MinecraftServer.a(MinecraftServer.java:290) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:210) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:458) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
I liked :D
@Nanoripper
I sent a PM message.
Ok fisrt i was stupid couse my world was empty.
So i fixed the config and i did a research, many try-outs BUT ....
PLz check the problem and the files i sent you in the Pm
and answer me if you want to help me.
Not really, it works perfect on offline servers. Reason is here:
14:33:43 [INFO] [PvPTracker] Enabling PvPTracker v1.1 14:33:43 [INFO] [PvPTracker] Warning: pvp_worlds list is empty. Check config! 14:33:45 [INFO] [PvPTracker] Disabling PvPTracker v1.1 14:33:45 [INFO] [PvPTracker] Warning: MySQL connection error, check config!
I put a sample config above you can check that for more info. But the main reason is plugin can't connect mysql and can't find any world names in your config
Is this Error coused that is an OffLine server?
craftbukkit-1.8.3-R0.1-SNAPSHOT 23-5-2015.jar
14:33:43 [INFO] [PvPTracker] Enabling PvPTracker v1.1
14:33:43 [INFO] [PvPTracker] Warning: pvp_worlds list is empty. Check config!
14:33:45 [INFO] [PvPTracker] Disabling PvPTracker v1.1
14:33:45 [INFO] [PvPTracker] Warning: MySQL connection error, check config!
14:33:45 [WARN] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException Communications link failure
14:33:45 The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
14:33:45 [WARN] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
14:33:45 [WARN] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
14:33:45 [WARN] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
14:33:45 [WARN] at java.lang.reflect.Constructor.newInstance(Unknown Source)
14:33:45 [WARN] at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
14:33:45 [WARN] at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
14:33:45 [WARN] at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)
14:33:45 [WARN] at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334)
14:33:45 [WARN] at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371)
14:33:45 [WARN] at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163)
14:33:45 [WARN] at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
14:33:45 [WARN] at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
14:33:46 [WARN] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
14:33:46 [WARN] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
14:33:46 [WARN] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
14:33:46 [WARN] at java.lang.reflect.Constructor.newInstance(Unknown Source)
14:33:46 [WARN] at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
14:33:46 [WARN] at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
14:33:46 [WARN] at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
14:33:46 [WARN] at java.sql.DriverManager.getConnection(Unknown Source)
14:33:46 [WARN] at java.sql.DriverManager.getConnection(Unknown Source)
14:33:46 [WARN] at code.husky.mysql.MySQL.openConnection(MySQL.java:58)
14:33:46 [WARN] at com.nanoripper.PvPTracker.Main.mysqlconnection(Main.java:293)
14:33:46 [WARN] at com.nanoripper.PvPTracker.Main.onEnable(Main.java:60)
14:33:46 [WARN] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321)
14:33:46 [WARN] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:327)
14:33:46 [WARN] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404)
14:33:46 [WARN] at org.bukkit.craftbukkit.v1_8_R2.CraftServer.loadPlugin(CraftServer.java:341)
14:33:46 [WARN] at org.bukkit.craftbukkit.v1_8_R2.CraftServer.enablePlugins(CraftServer.java:313)
14:33:46 [WARN] at net.minecraft.server.v1_8_R2.MinecraftServer.r(MinecraftServer.java:408)
14:33:46 [WARN] at net.minecraft.server.v1_8_R2.MinecraftServer.k(MinecraftServer.java:374)
14:33:46 [WARN] at net.minecraft.server.v1_8_R2.MinecraftServer.a(MinecraftServer.java:329)
14:33:46 [WARN] at net.minecraft.server.v1_8_R2.DedicatedServer.init(DedicatedServer.java:236)
14:33:46 [WARN] at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:501)
14:33:46 [WARN] at java.lang.Thread.run(Unknown Source)
14:33:46 [WARN] Caused by: java.net.ConnectException Connection refused: connect
14:33:46 [WARN] at java.net.DualStackPlainSocketImpl.connect0(Native Method)
14:33:46 [WARN] at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
14:33:46 [WARN] at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
14:33:46 [WARN] at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
14:33:46 [WARN] at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
14:33:46 [WARN] at java.net.PlainSocketImpl.connect(Unknown Source)
14:33:46 [WARN] at java.net.SocksSocketImpl.connect(Unknown Source)
14:33:46 [WARN] at java.net.Socket.connect(Unknown Source)
14:33:46 [WARN] at java.net.Socket.connect(Unknown Source)
14:33:46 [WARN] at java.net.Socket.<init>(Unknown Source)
14:33:46 [WARN] at java.net.Socket.<init>(Unknown Source)
14:33:46 [WARN] at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254)
14:33:46 [WARN] at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)
14:33:46 [WARN] ... 28 more
Nice, thank you. 👍