PacketEvents v1.8 now sends the API Version to bStats.

This commit is contained in:
retrooper committed 2022-01-16 22:39:35 +01:00
1 parent 6b82b38b59
commit 60a5357c34
3 files changed
+5 -20

No files matched your search

+1 -1
View File
@@ -21,7 +21,7 @@ Our discord server has a role for contributors and forkers.
[![](https://www.ej-technologies.com/images/product_banners/jprofiler_small.png)](https://www.ej-technologies.com/products/jprofiler/overview.html)
### Statistics
PacketEvents collects statistics anonymously through bStats. Participation is completely optional and you can opt-out at any time, although it is really helpful in figuring out what environments the plugin is running in (i.e. versions of Spigot, Java), so I can adjust development accordingly.
PacketEvents collects statistics anonymously using bStats. It helps give us an overview of what platforms use our project. If you really don't like, you can turn it off.
### Credit
PacketEvents uses an injector that is extremely similar to ViaVersion's injector. I have included license and copyright holder notice in the files taken from ViaVersion. Thank you ViaVersion.
@@ -191,6 +191,9 @@ public final class PacketEvents implements Listener, EventManager {
if (settings.isbStatsEnabled()) {
Metrics metrics = new Metrics((JavaPlugin) getPlugin(), 11327);
//Just to have an idea what versions of packetevents people use
//TODO Change version to correct version
metrics.addCustomChart(new Metrics.SimplePie("packetevents_version", () -> "1.8-pre-19"));
}
//We must wait for the injector to initialize.
@@ -1,21 +1,3 @@
/*
* This file is part of packetevents - https://github.com/retrooper/packetevents
* Copyright (C) 2021 retrooper and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package io.github.retrooper.packetevents.bstats;
import org.bukkit.Bukkit;
@@ -40,7 +22,7 @@ import java.util.function.Supplier;
import java.util.logging.Level;
import java.util.stream.Collectors;
import java.util.zip.GZIPOutputStream;
//This file was taken from bStats https://github.com/Bastian/bStats-Metrics
public class Metrics {
private final Plugin plugin;