PvPStats 1.0

You want to keep track of your users' PVP actions?

  1. PennekazGam3r
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    You want to keep track of your users' PVP actions? There you go. Drop the jar into your plugin folder, restart the server, change the config, restart - done!

    This plugin features saving of kills, deaths and killstreaks to a MySQL database, simple as that:

    Table name: pvpstats
    Colums:

    • name
    • kills
    • deaths
    • streak
    Since v0.6 it also supports more detailed stats, so you can check the kill / death count by time

    Table name: pvpkillstats
    Colums:

    • name
    • kill
    • time
    That's the basic equipment you need to display the PVP experience of your players.

    Commands:
    /pvpstats - show your pvp stats /pvpstats [player] - show player's pvp stats
    /pvpstats [amount] - show the top [amount] players (K-D)
    /pvpstats top [amount] - show the top [amount] players (K-D)
    /pvpstats top [type] - show the top 10 players of the type
    /pvpstats top [type] [amount] - show the top [amount] players of the type
    /pvpstats cleanup - clean the database of multi entries
    /pvpstats purge [amount] - purge KILLSTATS entries older than [amount] days
    /pvpstats reload - reload the config
    /pvpstats wipe [player] - wipe the stats [for a player]

    Permission nodes:
    pvpstats.cleanup:
    description: Ability to cleanup
    default: op
    pvpstats.purge:
    description: Ability to purge
    default: op
    pvpstats.reload:
    description: Ability to reload
    default: op
    pvpstats.wipe:
    description: Ability to wipe the stats
    default: op
    pvpstats.count:
    description: Permission to be counted
    default: true
    pvpstats.top:
    description: Permission to get global stats
    default: true

    Configuration:
    MySQL: true
    MySQLhost: localhost
    MySQLuser: [sql user]
    MySQLpass: [sql password]
    MySQLport: [sql port]
    MySQLdb: [sql database]
    MySQLtable: [sql table]
    MySQLkilltable: [sql kill table]

    PVPArena: false
    checkabuse: true
    abuseseconds: -1
    updatecheck: true
    autodownload: true
    tracker: true
    collectprecise: true
    clearonstart: true
    kdcalculation: '&k/(&d+1)'
    ignoreworlds:
    - doNotTrack
    eloscore:
    active: false
    minimum: 18
    default: 1500
    maximum: 3000
    k-factor:
    below: 32
    above: 16
    threshold: 2000
    msg:
    main:
    - '&cName:&7%n'
    - '&cKills:&7%k'
    - '&cDeaths:&7%d'
    - '&cRatio:&7%r'
    - '&cStreak:&7%s'
    - '&cMaxStreak:&7%m'

    PVPArena: should pvpstats try to hook into PA?
    checkabuse: should pvpstats disallow scoring by killing of the same player in a row?
    abuseseconds: the amount of seconds after which the abuse check gets reset
    updatecheck: should pvpstats check for updates on dev.bukkit.org?
    autodownload: should the update checker download things automatically? (false: only announce)
    tracker: may pvpstats phone home to report that your server is using it?
    collectprecise: should pvpstats save each kill with timestamp?
    clearonstart: should pvpstats check the database for duplicates on startup?
    kdcalculation: as stated in the config, this defines the calculation for the top X list, the following placeholders are possible:

    • &k - kills
    • &d - deaths
    • &s - current streak value
    • &m - max streak value
    ignoreworlds: a list of worlds that will not make kills count eloscore:

    • active: should we care about previous kills?
    • minimum: minimum score possible
    • default: default ELO score
    • maximum: maximum score possible
    • k-factor below: k-factor below threshold
    • k-factor above: k-factor above threshold
    • k-factor threshold: the border between the two k-factors
    Requirements:
    • a MySQL database


    Credits:
    • pandapipino for the idea :)

    Phoning home
    To determine popularity and usage of PVP Stats, the server contacts my private server for information purposes. It sends your port, IP (for proper server counting), and the plugin version. That's it! If you want to disable that, set "tracker" to false in the config!

    UUID ready!
    As of version 0.8, PVP Stats is ready for UUIDs, as soon as your server is. It updates the database to account for the new system of Player Unique Ids. If your server is ready, it connects to api.mojang.comand updates all database entries. This can cause lag, but it should be done in a few seconds. If your server is not ready, it will fall back to standard player name lookup, even if you decide to downgrade after "testing" the latest CraftBukkit dev version. However then, you will want to reset the new config setting about UUIDs to false again, so at next start, the database is converted again.