-
Notifications
You must be signed in to change notification settings - Fork 13
Statistics
Statistics keep track of a number of events during a game. The statistics can be used to show interesting information about the player and can be used to make leaderboards. The several statistics the plugin keeps track of are explained below.
Each of these statistics can be enabled/disabled separately in the config.yml. Go to stats > enable and go to the stat type you wish to change. Note that previously obtained stats will not be deleted, it will only disable the stats when you change the setting. Statistic signs which kept track of a now disabled statistic will show a message that this statistic is disabled.
To view your statistics, enter the command /bg stats.
Keeps track of how many times a player has played a game. This will increase as soon as the game has started, so players don't need to fully play the game in order to increase this statistic.
Keeps track of how many times a player has become first in game. If the arena is in team mode and the team wins, all members of the team will have increased this statistic regardless whether or not the player has actually helped within the game.
Keeps track of how many times a player has become second in game. If the arena is in team mode and the team wins, all members of the team will have increased this statistic regardless whether or not the player has actually helped within the game.
Keeps track of how many times a player has become third in game. If the arena is in team mode and the team wins, all members of the team will have increased this statistic regardless whether or not the player has actually helped within the game.
Keeps track of how many times a player has broken a block.
Keeps track of how many times a player has placed a block.
Keeps track of how long a player has walked for. This is measured in full blocks.
Keeps track of the amount of points you have given to other users.
Keeps track of the amount of points you have received from other users.
There're two ways the statistics are stored. The first on is flat-file storage, which means that everything is stored in the stats.yml file. The second option is in a MySQL database. MySQL is more secure, because it requires passwords to be changed, but MySQL needs to be hosted which may cost money and may be slower, because a connection with the database needs to be established (however flat-file becomes slower with larger files). Flat-file is less secure, but easier to use as it doesn't require extra hosting.
Regardless of the storage option, statistics will respect player name changes, so a player who changed his/her name will still keep his/her statistics. Note that this isn't the case if you have a UUID that changes, for example with cracked Minecraft copies.
The two types of storage options are explained below:
This is the default storage mechanism. This will save all statistics to the stats.yml. This is an easier, cheaper and (possibly) faster option than MySQL, but it's less secure. Note that only non-zero statistics are saved to save storage space. If you played a game and became first, the statistics for the becoming second and becoming third will not be saved as those are the same as the default value; zero.
This is an alternative to flat-file storage. This option is more secure and may be faster with larger amounts of players. To enable MySQL storage go into the config.yml and set stats > database > enable to true. Then specify the stats > database > user and password settings to your database.
Don't share these values with others as they grant access to your database.
Now specify the address to your database inside stats > database > address. If you host your database on the same server as your server, you only have to change the <database> to the name of your database. Otherwise you should edit the localhost to the IP of your database host. If you have no idea what I'm talking about only change the database name or ask your host for help with the IP address. Always leave the 'jdbc:' prefix in front of the text.
If you want to be more technical you can change the minimum and maximum amount of connections that should be made to the database. If you don't feel like this is needed or don't know how to work with them keep them as the default value.