playtime/README.md

38 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2019-12-26 17:05:42 +01:00
# PlayTime
2020-02-08 22:54:28 +01:00
[![pipeline status](https://gitlab.com/hamburghammer/playtime/badges/dev/pipeline.svg)](https://gitlab.com/hamburghammer/playtime/-/commits/dev)
[![coverage report](https://gitlab.com/hamburghammer/playtime/badges/dev/coverage.svg)](https://gitlab.com/hamburghammer/playtime/-/commits/dev)
2019-12-26 17:05:42 +01:00
It's a plugin for a [Spigot](https://www.spigotmc.org) Minecraft server to log the time players spend on the server and returns it to them.
2019-12-28 21:25:00 +01:00
## Features
- Simple usage
- No external DB needed
- No config
- Plug and Play
- Scheduled saving to prevent data loses by a crash
- Written in [Kotlin](https://kotlinlang.org/)
2019-12-28 21:25:00 +01:00
## Commands
`uptime` shows the current up time of the server. It's inspired by the linux tool returning the systems up time in DD:HH:MM format.
`playtime` shows the total play time on the server (Format DD:HH:MM)
2020-02-08 23:00:37 +01:00
`playtimeof <player>` shows the total play time of the player (Format DD:HH:MM)
`toptime` shows the top 5 player with the highest total playtime
## Development
The plugin gets build with gradle. It is important to run the shadowJar task to include all dependencies.
2020-02-08 23:00:37 +01:00
It's entirely written in Kotlin and for testing it uses [Mockk](https://mockk.io/) and [Junit5](https://junit.org/junit5/).
This plugin uses the [linter from Pinterest for Kotlin](https://www.kotlinresources.com/library/ktlint/)
If you want to contribute make sure to include the test for your code and add [Kotlin doc](https://kotlinlang.org/docs/reference/kotlin-doc.html).
**Feel free to create a merge request!**