StatsAPI v1.3

API for Developers!

  1. ItzSinix
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    [​IMG]
    - MySQL
    - Kills
    - Deaths
    - Wins
    - Games
    - BrokenBeds
    - BrokenBlocks

    - Loses
    - PlayedHours
    - PlayedMinutes
    - LuckyBlocks

    [​IMG]
    - /stats
    - /stats <Player>

    [​IMG]
    - StatsAPI.command
    - StatsAPI.commandusers

    [​IMG]
    Code (Text):
    CONFIG:
      PREFIX: '&7[&4StatsAPI&7]'
    MySQL:
      HOST: 127.0.0
      DBNAME: dbname
      USERNAME: root
      PASSWORD: password
     

    Methods for Developers!
    Code (Text):
            Player player = e.getPlayer();

            if(StatsAPI.playerExists(player.getUniqueId().toString()) == false){
                StatsAPI.createPlayer(player.getUniqueId().toString());
            }


                   StatsAPI.setDeaths(player.getUniqueId().toString(), deaths);
                   StatsAPI.addDeaths(player.getUniqueId().toString(), deaths);
                   StatsAPI.removeDeaths(player.getUniqueId().toString(), deaths);
                   StatsAPI.getDeaths(player.getUniqueId().toString());
           
                   StatsAPI.setKills(player.getUniqueId().toString(), kills);
                   StatsAPI.addKills(player.getUniqueId().toString(), kills);
                   StatsAPI.removeKills(player.getUniqueId().toString(), kills);
                   StatsAPI.getKills(player.getUniqueId().toString());
           
                   StatsAPI.setGames(player.getUniqueId().toString(), games);
                   StatsAPI.addGames(player.getUniqueId().toString(), games);
                   StatsAPI.removeGames(player.getUniqueId().toString(), games);
                   StatsAPI.getGames(player.getUniqueId().toString());
           
                   StatsAPI.setWins(player.getUniqueId().toString(), wins);
                   StatsAPI.addWins(player.getUniqueId().toString(), wins);
                   StatsAPI.removeWins(player.getUniqueId().toString(), wins);
                   StatsAPI.getWins(player.getUniqueId().toString());

                   StatsAPI.setBrokenBeds(player.getUniqueId().toString(), beds);
                   StatsAPI.addBrokenBeds(player.getUniqueId().toString(), beds);
                   StatsAPI.removeBrokenBeds(player.getUniqueId().toString(), beds);
                   StatsAPI.getBrokenBeds(player.getUniqueId().toString());
     
                   StatsAPI.setBrokenBeds(player.getUniqueId().toString(), blocks);
                   StatsAPI.addBrokenBlocks(player.getUniqueId().toString(), blocks);
                   StatsAPI.removeBrokenBlocks(player.getUniqueId().toString(), blocks);
                   StatsAPI.getBrokenBlocks(player.getUniqueId().toString());
           
                   StatsAPI.setLoses(player.getUniqueId().toString(), loses);
                   StatsAPI.addLoses(player.getUniqueId().toString(), loses);
                   StatsAPI.removeLoses(player.getUniqueId().toString(), loses);
                   StatsAPI.getLoses(player.getUniqueId().toString());

                  StatsAPI.setPlayedHours(player.getUniqueId().toString(), hours);
                  StatsAPI.addPlayedHours(player.getUniqueId().toString(), hours);
                  StatsAPI.removePlayedHours(player.getUniqueId().toString(), hours);
                  StatsAPI.getPlayedHours(player.getUniqueId().toString());
         
                  StatsAPI.setPlayedMinutes(player.getUniqueId().toString(), minutes);
                 StatsAPI.addPlayedMinutes(player.getUniqueId().toString(), minutes);
                 StatsAPI.removePlayedMinutes(player.getUniqueId().toString(), minutes);
                 StatsAPI.getPlayedMinutes(player.getUniqueId().toString());
         
                 StatsAPI.setLuckyBlocks(player.getUniqueId().toString(), luckyblocks);
                 StatsAPI.addLuckyBlocks(player.getUniqueId().toString(), luckyblocks);
                 StatsAPI.removeLuckyBlock(player.getUniqueId().toString(), luckyblocks);
                 StatsAPI.getLuckyBlocks(player.getUniqueId().toString());
     
    MattiPlays and SiniX like this.

Recent Updates

  1. + Update
  2. + Update
  3. + Update

Recent Reviews

  1. YoloboyZockt
    YoloboyZockt
    3/5,
    Version: v1.3
    Eig. ganz gut allerdings bekomme ich beim Befehl /stats folgenden Error in die Konsole gepsammt und es erstellt sich nichts in der Datenbank.

    [StatsAPI] Konnte das Update (INSERT INTO `Stats`(`UUID`, `KILLS`, `DEATHS`, `GAMES`, `WINS`, `LOSES`, `BROKENBEDS`,`BROKENBLOCKS` ,`PLAYEDTHOURS`, `PLAYEDTMINUITES` , `LUCKYBLOCKS` ) VALUES ('82cf04d0-a2fc-3841-922f-570960c6c5b4', '0', '0', '0', '0', '0', '0', '0', '0');) nicht ausf³hren!
  2. TheJorgeMC
    TheJorgeMC
    5/5,
    Version: v1.3
    Really useful, maybe a way to make custom stats, not just the ones integrated there, but really complete, love it.
    --------------------------
  3. Specialp
    Specialp
    5/5,
    Version: v1.3
    Thank you very much, It's help me with making my FFA plugin :)
    --------------------
  4. Kasiux
    Kasiux
    4/5,
    Version: v1.3
    Mein Problem ist, dass es irgendwie nicht zu MySQL connecten kann. Warum, weiß ich auch nicht. Es steht immer "Select * From 'Stats'"
    Was kann ich tun? Im JoinEvent habe ich gemacht, dass ein Spieler erstellt wird, sobald er noch nicht existiert. Doch sobald man /stats eingibt, kommen -zig Fehlermeldungen
  5. Benjooooo
    Benjooooo
    5/5,
    Version: v1.3
    Nice API ................. ._. ................ ._. ...................... ._. ......................
  6. Passimoritz
    Passimoritz
    5/5,
    Version: v1.3
    Das Plugin bzw die API ist Super:)
    Freue mich auf das nächste Update :)
    -------------------------------
  7. Airos10
    Airos10
    5/5,
    Version: v1.3
    Nice resource, thanks for sharing, this works with cache methods? and asynchronous tasks?
    Maybe u can add custom rows in your API :D