mirror of
https://github.com/itHotL/PlayerStats.git
synced 2025-02-19 02:11:56 +01:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
86ef019371
70
README.md
70
README.md
@ -5,12 +5,14 @@
|
|||||||
|
|
||||||
## About
|
## About
|
||||||
PlayerStats is a Minecraft server plugin that adds a command to view player statistics in
|
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** on platforms:
|
top-10 format or individually. Currently tested on all versions between **1.16.5** and **1.19.2** on platforms:
|
||||||
- Bukkit
|
- Bukkit
|
||||||
- Spigot
|
- Spigot
|
||||||
- Paper
|
- Paper
|
||||||
- Purpur
|
- Purpur
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
* **Easy to use**
|
* **Easy to use**
|
||||||
- One central command that can:
|
- One central command that can:
|
||||||
@ -20,17 +22,15 @@ top-10 format or individually. Currently tested on all versions between **1.16.5
|
|||||||

|

|
||||||
- See those same statistics for any **individual player** with `/statistic ... player`
|
- See those same statistics for any **individual player** with `/statistic ... player`
|
||||||

|

|
||||||
- Or look up the **combined total** of everyone on your server!
|
- Or look up the **combined total** of everyone on your server
|
||||||

|

|
||||||
- Guide you through the available options while you type with an extensive **tab-complete** feature
|
- Guide you through the available options while you type with an extensive **tab-complete** feature
|
||||||

|

|
||||||
- See the output in a **readable format** that makes sense in the Minecraft world, with more information in hover-text:
|
- See the output in a **readable format** that makes sense in the Minecraft world, with more information in hover-text:
|
||||||

|
|
||||||

|

|
||||||
- **Share statistics** that you look up with the other players in chat!
|
- **Share statistics** that you look up with the other players in chat:
|
||||||
<p align="center">
|

|
||||||
<img src="src/main/resources/images/sharing_top_10.png">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
* **No set-up required**
|
* **No set-up required**
|
||||||
- PlayerStats will work correctly regardless of how long your server has already existed - it doesn't
|
- PlayerStats will work correctly regardless of how long your server has already existed - it doesn't
|
||||||
@ -38,17 +38,23 @@ top-10 format or individually. Currently tested on all versions between **1.16.5
|
|||||||
- Data is retrieved directly from already existing playerfiles, so you don't have to
|
- 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
|
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](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)!
|
||||||
|
|
||||||
|
|
||||||
* **Safe**
|
* **Safe**
|
||||||
- PlayerStats uses **multi-threading** to ensure server performance does not suffer and
|
- PlayerStats uses **multi-threading** to ensure server performance does not suffer and
|
||||||
players cannot crash the server by spamming its commands
|
players cannot crash the server by spamming its commands
|
||||||
- This also means that for small to medium-sized servers, calculating statistics will be very **fast**
|
- This also means that calculating statistics will be very **fast**
|
||||||
**For large servers (10.000+ players), please read the disclaimer below**
|
|
||||||
|
|
||||||
* **Customizable**
|
* **Customizable**
|
||||||
- You can customize the following (and more!):
|
- You can customize the following (and more):
|
||||||
- Choose which **range of units** you want to display your time-, damage- and distance-based statistics in:
|
- Choose which **range of units** you want to display your time-, damage- and distance-based statistics in:
|
||||||

|

|
||||||
- **Automatically translate** statistics to the language of the client that views them
|
- **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!
|
- Use festive formatting, or enable rainbow mode whenever!
|
||||||

|

|
||||||
- Only show statistics for **whitelisted** players
|
- Only show statistics for **whitelisted** players
|
||||||
@ -66,25 +72,43 @@ top-10 format or individually. Currently tested on all versions between **1.16.5
|
|||||||
- `playerstats.share` for sharing statistics in chat (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.reload` for reloading the config (only for OP players by default)
|
||||||
|
|
||||||
## Disclaimer
|
|
||||||
How PlayerStats performs, will heavily depend on the amount of unique players that have joined
|
|
||||||
your server, and on the specs of the machine it is running on. I have done elaborate testing on
|
|
||||||
my local server, and it is currently also running on the SMP I play on. Looking up an individual
|
|
||||||
statistic is always nearly instant, but for a **top statistic** it can vary.
|
|
||||||
|
|
||||||
If you have a large amount of unique players (10.000+), you could run into performance issues.
|
## API Usage
|
||||||
If you notice it takes a long time to calculate top statistics, I recommend limiting
|
To import the PlayerStats API with Maven, add the following dependency and repository to your POM.xnl:
|
||||||
the amount of included players by setting a `number-of-days-since-last-joined` limit in the config.
|
|
||||||
Additionally, if you run into issues, you could revoke the permission `playerstats.stat`
|
|
||||||
for most players, and only allow selected players (such as staff, for example) to use it.
|
|
||||||
|
|
||||||
I am working to improve performance for larger servers in the future,
|
```xml
|
||||||
and I'd love to hear feedback on how the plugin is performing!
|
<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](https://s01.oss.sonatype.org/service/local/repositories/snapshots/archive/io/github/ithotl/PlayerStats/1.7.2-SNAPSHOT/PlayerStats-1.7.2-20220820.193831-3-javadoc.jar/!/com/artemis/the/gr8/playerstats/api/PlayerStats.html).
|
||||||
|
To get an instance of the API, you can do the following:
|
||||||
|
|
||||||
|
```java
|
||||||
|
PlayerStats playerStats = PlayerStats.getAPI();
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Author Info
|
## Author Info
|
||||||
I am a relatively new programmer, and this is one of my first projects. I greatly enjoyed making it,
|
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,
|
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](https://github.com/Artemis-the-gr8) on GitHub.
|
please let me know! You can find me [here](https://github.com/Artemis-the-gr8) on GitHub.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Licence
|
## Licence
|
||||||
PlayerStats is licenced under the MIT licence. Please see [LICENCE](LICENSE) for more information.
|
PlayerStats is licenced under the MIT licence. Please see [LICENCE](LICENSE) for more information.
|
||||||
|
Loading…
Reference in New Issue
Block a user