StatsAPI
Description
English / Englisch
This Plugin adds Stats to your BungeeCord Network or Server. Simply import the API into your Plugin and use the Code Samples below. The Plugin requires a MySQL Database.
German / Deutsch
Dieses Plugin fügt Stats zu deinem BungeeCord Netzwerk oder Server hinzu. Importiere einfach die API in dein Plugin und benutze die folgenden Code-Teile. Das Plugin benötigt eine MySQL Datenbank.
Features
- MySQL Required
- Stats:
- Kills
- Deaths
- Games
- Wins
- Balance (Money)
Install
English / Englisch
- Drag the StatsAPI.jar in your Server´s Plugin folder
- Create a MySQL Database if you don´t have one
- Restart your Server and edit the Config.yml
- Import the StatsAPI.jar to your own Plugin
- Add some of the Code Samples below to your Plugin
- Finish!
German / Deutsch
- Ziehe die StatsAPI.jar in den Plugin Ordner deines Servers
- Erstelle eine MySQL Datenbank, falls du noch keine hast
- Starte deinen Server neu und editiere die Config.yml
- Importiere die StatsAPI.jar in dein Plugin
- Füge deinem Plugin einige unten genannte Code Samples hinzu
- Fertig!
Code Samples
if(StatsAPI.knowPlayer(PLAYER_UUID) == true){ }
Checks if the Player´s UUID has an entry in your Stats table. | Prüft, ob der gewählte Spieler PLAYER_UUID einen Eintrag in deiner Stats-Tabelle hat.
StatsAPI.createPlayer(PLAYER_UUID);
Adds the given UUID to the Stats table. | Fügt die angegebene UUID der Stats Tabelle hinzu.
StatsAPI.getKills(PLAYER_UUID); StatsAPI.getDeaths(PLAYER_UUID); StatsAPI.getGames(PLAYER_UUID); StatsAPI.getWins(PLAYER_UUID); StatsAPI.getBalance(PLAYER_UUID);
Returns the corresponding value of the Player with the UUID "PLAYER_UUID".| Gibt den entsprechenden Wert des Spielers mit der UUID "PLAYER_UUID" aus.
StatsAPI.setKills(PLAYER_UUID, VALUE); StatsAPI.setDeaths(PLAYER_UUID, VALUE); StatsAPI.setGames(PLAYER_UUID, VALUE); StatsAPI.setWins(PLAYER_UUID, VALUE); StatsAPI.setBalance(PLAYER_UUID, VALUE);
Sets the corresponding value of the Player with the UUID "PLAYER_UUID" to "VALUE". | Setzt den entsprechenden Wert des Spielers mit der UUID "PLAYER_UUID" zu "VALUE".
StatsAPI.addKills(PLAYER_UUID, VALUE); StatsAPI.addDeaths(PLAYER_UUID, VALUE); StatsAPI.addGames(PLAYER_UUID, VALUE); StatsAPI.addWins(PLAYER_UUID, VALUE); StatsAPI.addBalance(PLAYER_UUID, VALUE);
Adds "VALUE" to the corresponding value of the Player with the UUID "PLAYER_UUID". | Fügt "VALUE" zu dem entsprechenden Wert des Spielers mit der UUID "PLAYER_UUID" hinzu".
StatsAPI.removeKills(PLAYER_UUID, VALUE); StatsAPI.removeDeaths(PLAYER_UUID, VALUE); StatsAPI.removeGames(PLAYER_UUID, VALUE); StatsAPI.removeWins(PLAYER_UUID, VALUE); StatsAPI.removeBalance(PLAYER_UUID, VALUE);
Removes "VALUE" from the corresponding value of the Player with the UUID "PLAYER_UUID". | Nimmt "VALUE" von dem entsprechenden Wert des Spielers mit der UUID "PLAYER_UUID" weg".
Hey,
könntest du vielleicht noch eine K/D adden?
danke
my config is blanco / empety.. i delete it and each time i restart still blanco
@2008Choco
Hey, i just created this plugin page and it´s not already finished! I am writing it right now ;) Greetings, TheFlint
What kind of stats? Why should we use this? How do we use this (no code snippets)? What benefits do we get out of this? Documentation is key to an API.
We need a bit more information about what this is. Unfortunately "This plugin adds stats to your network / server" isn't much information. How can we actually obtain these stats a well. We need just a little bit more info :3. I'm sure it's a great API though