A Spigot plugin that tracks statistics with InfluxDB for timescale analytics.

Overview

RiceStats

I made this plugin for my SMP server. It's able to track statistics and send it to InfluxDB where it can be processed by an analytics program such as Grafana. Don't flame me for my inexperience with InfluxDB :p, I've only used it a couple times.

Table of Contents

Installation

Make sure you install Paper 1.18.1 or a similar paper-fork (Please use 1.18.1 because I am using NMS fields from that version). Once you do you can either deploy InfluxDB through the provided docker-compose.yml by running:

  docker-compose up -d

Alternatively, you can deploy your own InfluxDB 1.0 instance.

Once you've deployed your InfluxDB Database you'll have to fill out the authentication parameters in the plugin config.

Launch the server and you'll start to see statistics flowing into InfluxDB!

Tech Stack

The current technologies that the plugin is currently using

  • Paper - The server api that this plugin is using to interact with Spigot.
  • InfluxDB - A realtime time series database to track and store statistics that are brought in.
  • Spigot - The Minecraft server software that runs everything.
  • Grafana - The visualization tool that I use to visualize and analyze the statistics.

Tracked Statistics

Server Statistics

  • TPS (1min,5min,15min)
  • Average MSPT
  • Available CPU Cores
  • CPU Usage 10s, 1min, 15m, Realtime)
  • Total Memory
  • Free Memory
  • Max Memory
  • Current players
  • Max Players

Player Statistics

  • Blocks Broken
  • Blocks placed
  • Animals bred
  • Sheeps dyed
  • Entities leashed
  • Fish caught
  • Entities mounted
  • Monsters killed
  • Experience Earned
  • Deaths
  • Items crafted
  • Foods eaten
  • Time Ingame
  • Times joined
  • Times left
  • World changing (Going to the nether/end)
  • Villager trading
  • Raids finished
  • Raids failed
  • Raid waves completed
  • Raids started

Examples

Here is an example of how I visualized the data from my SMP in Grafana using this plugin.

Per Player Statistics with player swapping variables Image

Server statistics with some pie graphs and MSPT alerts Image2

If you would like to use or check out this visualizer. You can check it out here

InfluxDB Technicalities

All player related points have a player and a uuid tag attached to them which are the player's username and uuid. You can use this to filter by player. On top of that, trackers that track anything that tracks any static value in Bukkit such as Materials are also stored as tags for easy access. Below, I have provided a list of each point and what they do. If you're too lazy or if I don't finish the list. You're able to look into the source code at trackers/<category>/<Tracker> (or click me and see what trackers are available + the tags and fields that they provide.

Contributions

Contributions are welcome! Feel free to make a pull request if you feel that something can be done better or you want to add in a new or improve a feature.

License

The MIT License (MIT)

Copyright (c) 2022 RiceCX

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You might also like...

An advanced coin plugin for spigot.

rCoins Description rCoins is an advanced coin system which has a great api. For developers If you need to use API of rCoins, you can use maven or grad

Sep 22, 2022

Minecraft spigot plugin for.... spits (just for fun) [1.16+]

Minecraft spigot plugin for.... spits (just for fun) [1.16+]

Easy-to-use fun plugin that just adds ability to... spit :3 How to spit? Just use /funnyspits spit command! You can also use /spit, which is more fast

Jul 6, 2022

MissileWars is a famous, fun and fast minigame spigot-plugin for Minecraft

MissileWars MissileWars is a famous, fun and fast minigame spigot-plugin for Minecraft Downloads Get binary jars directly here: https://www.spigotmc.o

Dec 23, 2022

DnD Plugin submission using Atlas. Plugin inspired on the TrollGUI bukkit plugin

πŸ’‘ PunishGUI DnD Plugin submission using Atlas. Plugin inspired on the TrollGUI bukkit plugin πŸ“œ Dependencies πŸ“ƒ Paper 1.18 🌎 Atlas πŸ’» Commands /hell

Jan 19, 2022

[Minecraft] Configs from Spigot core

SpigotConfigLibrary [Minecraft] Configs from Spigot core English This is a cut-out piece of config code from the Spigot core. You can use it for conve

Sep 9, 2022

Totally Spigot 1.17

"""Spigot 1.17""" Thanks for all the rages, but Spigot 1.17 is now officially available and can be obtained by using BuildTools! See this for more inf

Jun 3, 2022

sign gui api for spigot plugins

hSignAPI public class ExampleSign extends JavaPlugin { private SignAPI signAPI; @Override public void onEnable() { this.signAPI

Jan 6, 2022

particle api for spigot plugins

hParticleAPI public class ExampleParticle extends JavaPlugin { private ParticleAPI particleAPI; @Override public void onEnable() {

Dec 15, 2021

An advanced 1.8.8 spigot backdoor.

CelestialBackdoor An advanced 1.8.8 spigot backdoor. This backdoor contains a plethora of commands to execute. This backdoor supports commands for Dis

Jan 19, 2022
Comments
  • Villager Trades result in error

    Villager Trades result in error

    Seems to happen every time a villager trade is initiated.

    ERROR: Could not pass event InventoryClickEvent to RiceStats v1.0
    
    cc.ricecx.ricestats.core.event.InvalidNmsOperationsState: NmsOperations: Some classes or methods were not successfully loaded!
    at cc.ricecx.ricestats.core.event.NmsOperations.checkAllClassesAndMethodsOK(NmsOperations.java:61) ~[ricestats-1.0.jar:?]
    at cc.ricecx.ricestats.core.event.NmsOperations.getPriceAdjustedIngredient1(NmsOperations.java:104) ~[ricestats-1.0.jar:?]
    at cc.ricecx.ricestats.core.event.VillagerTradeListener.onInventoryClickEvent(VillagerTradeListener.java:287) ~[ricestats-1.0.jar:?]
    at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor78.execute(Unknown Source) ~[?:?]
    at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:git-Purpur-1848]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:678) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3403) ~[?:?]
    at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:58) ~[?:?]
    at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:23) ~[?:?]
    at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?]
    at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.19.2.jar:git-Purpur-1848]
    at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
    at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1368) ~[purpur-1.19.2.jar:git-Purpur-1848]
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:185) ~[purpur-1.19.2.jar:git-Purpur-1848]
    at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
    at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1345) ~[purpur-1.19.2.jar:git-Purpur-1848]
    at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1338) ~[purpur-1.19.2.jar:git-Purpur-1848]
    at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
    at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1316) ~[purpur-1.19.2.jar:git-Purpur-1848]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1204) ~[purpur-1.19.2.jar:git-Purpur-1848]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:310) ~[purpur-1.19.2.jar:git-Purpur-1848]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
    
    opened by HStep20 2
  • Grafana link is dead

    Grafana link is dead

    It seems the Grafana link to the example dashboard is dead. Do you still have the json for your example dashboard you can add to the repo? Id love to take a look at some of the panels, like the Player Skin

    opened by HStep20 1
Owner
Andy
I code on my free time. Running off of 3 batteries πŸ”‹ and coke. 🍭
Andy
Minecraft Spigot 1.16 - plugin for compass tracking other players. MVP contains tracking closest player available.

Compass Tracker Overview Minecraft Spigot 1.16 Plugin. Plugin sets compass target to closest player in the overworld. Created to use with my friends t

INNIX 3 Nov 15, 2021
simple spigot plugin malware remover, made in 10 minutes lol

spigot-malware-remover Simple spigot plugin malware remover made in 10 minutes, using ASM bytecode manipulation library. Compile it using maven, if yo

MichaΕ‚ Kaczmarek 24 Oct 29, 2022
Unnerved by 1.18 fog? This Spigot plugin will remove it!

ClearFog Are you also unnerved by the new 1.18 fog system? And you tried to increase the server view distance? You don't have to! This Spigot plugin "

Rapha149 4 Dec 19, 2022
Plugin with helpful tools for factions, made to be used beside atlas spigot.

AtlasUtils Plugin with helpful tools for factions, made to be used beside atlas spigot. Features: Config: Found in your plugins folder at AtlasUtils/c

null 2 Dec 24, 2021
A Spigot plugin to edit block properties and more.

BoneTool BoneTool is a tool created to edit block properties with many features for builders. This is a creative tool developed as a package of featur

DeZilla 1 Jan 6, 2022
Spigot plugin with a bunch of quite useful commands in it!

QuiteUsefulCommands Spigot plugin with a bunch of quite useful commands in it. Install Download the latest release and drag it into your server's plug

MightyCoderX 6 Aug 20, 2022
A simple Bingo Plugin for Spigot 1.18.1

Bingo The first one to find 4 items in a line wins A simple Bingo Plugin for Spigot 1.18.1 Preview Commands /board - Prints out the Bingo Board to the

null 7 Jun 19, 2022
πŸƒ A lightweight, multiarena, complex Parkour Spigot/Bukkit plugin for Minecraft Server

?? A lightweight, multiarena, multilanguage, completely configurable and complex Parkour Spigot/Bukkit plugin for Minecraft Server

Victor Rodrigues 6 Oct 17, 2022
Spigot Plugin for creating light shows/concerts in Minecraft

Spigot Plugin for creating light shows/concerts in Minecraft. It works by simulating ingame effects like guardian and beacon beams.

null 38 Dec 16, 2022
A spigot plugin for spawning a chest when the player dies

A spigot plugin for spawning a chest when the player dies. It supports Holographic Displays, Decent Holograms, ProtocolLib, WorldGuard, and PlotSquared for additional features

Ricardo Borutta 6 Dec 30, 2022