PlayerStats/README.md

119 lines
5.8 KiB
Markdown
Raw Normal View History

2022-05-31 23:47:21 +02:00
<p align="center">
2022-06-14 12:30:15 +02:00
<img src="src/main/resources/images/logo_gray_rounded.png">
2022-05-31 23:47:21 +02:00
</p>
## About
2022-05-31 21:00:45 +02:00
PlayerStats is a Minecraft server plugin that adds a command to view player statistics in
2023-03-24 12:03:37 +01:00
top-10 format or individually. Currently tested on all versions between **1.16.5** and **1.19.4** on platforms:
2022-05-31 21:00:45 +02:00
- Bukkit
- Spigot
- Paper
- Purpur
2023-03-24 12:08:33 +01:00
(It's possible PlayerStats works on other platforms too, but these are the ones I have explicitly tested.)
2022-08-22 00:29:22 +02:00
&nbsp;
2022-05-31 20:08:09 +02:00
## Features
* **Easy to use**
2022-08-22 00:29:22 +02:00
- One central command that can:
- Explain **how to use** the plugin with `/statistic`
![Usage](src/main/resources/images/usage.png)
- Show you the **top 10** on your server for all possible statistics with `/statistic ... top`
![Top_10](src/main/resources/images/top_10.png)
- See those same statistics for any **individual player** with `/statistic ... player`
![Individual_Stat](src/main/resources/images/individual_stat.png)
- Or look up the **combined total** of everyone on your server
![New_Numbers](src/main/resources/images/new_numbers.png)
- Guide you through the available options while you type with an extensive **tab-complete** feature
![Tab_Complete](src/main/resources/images/tab_complete.png)
- See the output in a **readable format** that makes sense in the Minecraft world, with more information in hover-text:
![Damage_Format](src/main/resources/images/damage_format.png)
- **Share statistics** that you look up with the other players in chat:
![Shared_Top_10](src/main/resources/images/shared_top_10.png)
2022-05-31 20:08:09 +02:00
* **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
2022-08-22 00:29:22 +02:00
* **PlaceholderAPI support**
- Placeholders are added in a separate expansion, which can be found on [GitHub](https://github.com/Artemis-the-gr8/PlayerStatsExpansion), in the PlaceholderAPI [eCloud](https://api.extendedclip.com/expansions/playerstatsexpansion/), or downloaded in-game with `/papi ecloud download PlayerStats`
- For more information about the placeholders, see the expansion's [GitHub](https://github.com/Artemis-the-gr8/PlayerStatsExpansion)!
2022-05-31 20:08:09 +02:00
* **Safe**
- PlayerStats uses **multi-threading** to ensure server performance does not suffer and
2022-05-31 21:00:45 +02:00
players cannot crash the server by spamming its commands
2022-08-22 00:29:22 +02:00
- This also means that calculating statistics will be very **fast**
2022-05-31 20:08:09 +02:00
2022-05-31 21:37:38 +02:00
* **Customizable**
2022-08-22 00:29:22 +02:00
- You can customize the following (and more):
2022-07-05 17:26:05 +02:00
- Choose which **range of units** you want to display your time-, damage- and distance-based statistics in:
![Time_Format](src/main/resources/images/time_format.png)
2022-08-22 00:29:22 +02:00
- **Automatically translate** statistics to the language of the client that views them, or customize the statistic-names through the **language.yml** file
2022-07-05 17:28:25 +02:00
- Use festive formatting, or enable rainbow mode whenever!
2022-07-05 17:26:05 +02:00
![Translated](src/main/resources/images/translated.png)
2022-05-31 21:09:58 +02:00
- Only show statistics for **whitelisted** players
- Exclude statistics from **banned** players
2023-03-02 12:29:24 +01:00
- Exclude statistics from specific players with `/statexclude`
2022-07-20 17:33:27 +02:00
- Limit who is allowed to **share statistics** in chat and how often players can share
2022-05-31 21:37:38 +02:00
- Limit statistics based on when a player **last joined**.
2022-05-31 21:00:45 +02:00
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.
2022-07-20 17:33:27 +02:00
On top of that, limiting the amount of players shown in the top 10 can greatly increase performance speed.
2022-05-31 21:09:58 +02:00
- The **colors** you want the output to be
2022-07-05 17:26:05 +02:00
- You can go for default Minecraft chat colors, or use **hex colors**!
2022-05-31 21:09:58 +02:00
- 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)
2022-07-20 17:33:27 +02:00
- `playerstats.share` for sharing statistics in chat (true for everyone by default)
2022-05-31 21:09:58 +02:00
- `playerstats.reload` for reloading the config (only for OP players by default)
2023-03-02 12:29:24 +01:00
- `playerstats.exclude` to exclude players from top- and server-statistics (only for OP players by default)
2022-05-31 20:08:09 +02:00
2022-08-22 00:29:22 +02:00
&nbsp;
2022-08-22 14:56:42 +02:00
## API Usage
To import the PlayerStats API with Maven, add the following dependency and repository to your POM.xnl:
```xml
<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>
```
2023-03-02 12:29:24 +01:00
You can download the sources and Javadocs through your code editor, or visit the Javadocs [here](https://s01.oss.sonatype.org/service/local/repositories/snapshots/archive/io/github/ithotl/PlayerStats/2.0-SNAPSHOT/PlayerStats-2.0-20230228.110241-1-javadoc.jar/!/com/artemis/the/gr8/playerstats/api/PlayerStats.html).
2022-08-22 14:56:42 +02:00
To get an instance of the API, you can do the following:
```java
PlayerStats playerStats = PlayerStats.getAPI();
```
&nbsp;
## 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,
2022-06-01 00:13:05 +02:00
please let me know! You can find me [here](https://github.com/Artemis-the-gr8) on GitHub.
2022-08-22 00:29:22 +02:00
&nbsp;
## Licence
2022-05-31 20:08:09 +02:00
PlayerStats is licenced under the MIT licence. Please see [LICENCE](LICENSE) for more information.