mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 00:47:38 +01:00
Fix metrics, I hope.
This commit is contained in:
parent
8237774639
commit
a179158f34
@ -1,4 +1,4 @@
|
||||
From 2f462a8b4cf8db8ad8b18e93707fafecfe20a1e2 Mon Sep 17 00:00:00 2001
|
||||
From 25d1e688c5485b2e23a52c56f2c49ec36eb55883 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Feb 2013 08:58:35 +1100
|
||||
Subject: [PATCH] Metrics. Rewrite the Metrics system to be closer to the
|
||||
@ -11,7 +11,7 @@ Subject: [PATCH] Metrics. Rewrite the Metrics system to be closer to the
|
||||
create mode 100644 src/main/java/org/spigotmc/Metrics.java
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
index dafbbc7..8c3cda5 100644
|
||||
index dafbbc7..ced4bd4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
@@ -1,13 +1,19 @@
|
||||
@ -39,7 +39,7 @@ index dafbbc7..8c3cda5 100644
|
||||
|
||||
tabPing = configuration.getBoolean("settings.tab-ping", tabPing);
|
||||
+
|
||||
+ if (metrics != null) {
|
||||
+ if (metrics == null) {
|
||||
+ try {
|
||||
+ metrics = new Metrics();
|
||||
+ metrics.start();
|
||||
@ -52,7 +52,7 @@ index dafbbc7..8c3cda5 100644
|
||||
/**
|
||||
diff --git a/src/main/java/org/spigotmc/Metrics.java b/src/main/java/org/spigotmc/Metrics.java
|
||||
new file mode 100644
|
||||
index 0000000..085df9f
|
||||
index 0000000..f1690a2
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/spigotmc/Metrics.java
|
||||
@@ -0,0 +1,645 @@
|
||||
@ -404,7 +404,7 @@ index 0000000..085df9f
|
||||
+ // Server software specific section
|
||||
+ String pluginName = "Spigot";
|
||||
+ boolean onlineMode = Bukkit.getServer().getOnlineMode(); // TRUE if online mode is enabled
|
||||
+ String pluginVersion = (Metrics.class.getPackage() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown";
|
||||
+ String pluginVersion = (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown";
|
||||
+ String serverVersion = Bukkit.getVersion();
|
||||
+ int playersOnline = Bukkit.getServer().getOnlinePlayers().length;
|
||||
+
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6ef28f7cbf0936ddb73d5ae8fde5e9b043070e74 Mon Sep 17 00:00:00 2001
|
||||
From 48cf8759487754486c207f668ea1f04163f93f26 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Thu, 14 Feb 2013 17:32:20 +1100
|
||||
Subject: [PATCH] Netty
|
||||
@ -222,7 +222,7 @@ index 58d30eb..e4e5049 100644
|
||||
// CraftBukkit end
|
||||
this.pendingConnection = pendingconnection;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
index 5a96c86..eb02e56 100644
|
||||
index 15acc97..dbc3e48 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
@@ -18,6 +18,8 @@ public class Spigot {
|
||||
@ -244,7 +244,7 @@ index 5a96c86..eb02e56 100644
|
||||
+ server.getLogger().severe("[Warning] You have opted not to use Netty, in the future this option may be removed!");
|
||||
+ }
|
||||
+
|
||||
if (metrics != null) {
|
||||
if (metrics == null) {
|
||||
try {
|
||||
metrics = new Metrics();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
|
Loading…
Reference in New Issue
Block a user