PlayerStats/README.md
2023-03-24 12:03:37 +01:00

5.7 KiB

About

PlayerStats is a Minecraft server plugin that adds a command to view player statistics in top-10 format or individually. Currently tested on all versions between 1.16.5 and 1.19.4 on platforms:

  • Bukkit
  • Spigot
  • Paper
  • Purpur

 

Features

  • Easy to use

    • One central command that can:
      • Explain how to use the plugin with /statistic Usage
      • Show you the top 10 on your server for all possible statistics with /statistic ... top Top_10
      • See those same statistics for any individual player with /statistic ... player Individual_Stat
      • Or look up the combined total of everyone on your server New_Numbers
      • Guide you through the available options while you type with an extensive tab-complete feature Tab_Complete
      • See the output in a readable format that makes sense in the Minecraft world, with more information in hover-text: Damage_Format
      • Share statistics that you look up with the other players in chat: Shared_Top_10
  • No set-up required

    • PlayerStats will work correctly regardless of how long your server has already existed - it doesn't have to be present when you start a new world
    • Data is retrieved directly from already existing playerfiles, so you don't have to set up a database, use scoreboards, or anything of the sort
  • PlaceholderAPI support

    • Placeholders are added in a separate expansion, which can be found on GitHub, in the PlaceholderAPI eCloud, or downloaded in-game with /papi ecloud download PlayerStats
    • For more information about the placeholders, see the expansion's GitHub!
  • Safe

    • PlayerStats uses multi-threading to ensure server performance does not suffer and players cannot crash the server by spamming its commands
    • This also means that calculating statistics will be very fast
  • Customizable

    • You can customize the following (and more):
      • Choose which range of units you want to display your time-, damage- and distance-based statistics in: Time_Format
      • Automatically translate statistics to the language of the client that views them, or customize the statistic-names through the language.yml file
      • Use festive formatting, or enable rainbow mode whenever! Translated
      • Only show statistics for whitelisted players
      • Exclude statistics from banned players
      • Exclude statistics from specific players with /statexclude
      • Limit who is allowed to share statistics in chat and how often players can share
      • Limit statistics based on when a player last joined.
        This option can be particularly useful if you have had a lot of players join your server in the past whose statistics aren't of particular interest to your current player-base. On top of that, limiting the amount of players shown in the top 10 can greatly increase performance speed.
      • The colors you want the output to be
      • You can go for default Minecraft chat colors, or use hex colors!
      • Whether you want the output to have additional style, such as italics
    • You can configure the following permissions:
      • playerstats.stat for using the general command (true for everyone by default)
      • playerstats.share for sharing statistics in chat (true for everyone by default)
      • playerstats.reload for reloading the config (only for OP players by default)
      • playerstats.exclude to exclude players from top- and server-statistics (only for OP players by default)

 

API Usage

To import the PlayerStats API with Maven, add the following dependency and repository to your POM.xnl:

<repositories>
    <repository>
        <id>sonatype-oss-snapshots1</id> <!-- the OSSRH repository for snapshots -->
        <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
     </repository>
</repositories>
 
<dependencies>
    <dependency>
        <groupId>io.github.ithotl</groupId>
        <artifactId>PlayerStats</artifactId>
        <version>1.7.2-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

You can download the sources and Javadocs through your code editor, or visit the Javadocs here.
To get an instance of the API, you can do the following:

PlayerStats playerStats = PlayerStats.getAPI();

 

Author Info

I am a relatively new programmer, and this is one of my first projects. I greatly enjoyed making it, and I tried to make it as efficient as I could. If you have any questions, remarks, or suggestions, please let me know! You can find me here on GitHub.

 

Licence

PlayerStats is licenced under the MIT licence. Please see LICENCE for more information.