1
1
package com .comphenix .protocol .metrics ;
2
2
3
+ import com .comphenix .protocol .ProtocolLib ;
3
4
import org .bukkit .Bukkit ;
4
5
import org .bukkit .configuration .file .YamlConfiguration ;
5
6
import org .bukkit .entity .Player ;
6
- import org .bukkit .plugin .Plugin ;
7
7
import org .bukkit .plugin .RegisteredServiceProvider ;
8
8
import org .bukkit .plugin .ServicePriority ;
9
9
import org .json .simple .JSONArray ;
@@ -56,7 +56,7 @@ public class Metrics {
56
56
private static String serverUUID ;
57
57
58
58
// The plugin
59
- private final Plugin plugin ;
59
+ private final ProtocolLib plugin ;
60
60
61
61
// A list with all custom charts
62
62
private final List <CustomChart > charts = new ArrayList <>();
@@ -66,7 +66,7 @@ public class Metrics {
66
66
*
67
67
* @param plugin The plugin which stats should be submitted.
68
68
*/
69
- public Metrics (Plugin plugin ) {
69
+ public Metrics (ProtocolLib plugin ) {
70
70
if (plugin == null ) {
71
71
throw new IllegalArgumentException ("Plugin cannot be null!" );
72
72
}
@@ -151,7 +151,7 @@ public void run() {
151
151
}
152
152
// Nevertheless we want our code to run in the Bukkit main thread, so we have to use the Bukkit scheduler
153
153
// Don't be afraid! The connection to the bStats server is still async, only the stats collection is sync ;)
154
- Bukkit .getScheduler ().runTask (plugin , Metrics .this ::submitData );
154
+ plugin .getScheduler ().runTask (Metrics .this ::submitData );
155
155
}
156
156
}, 1000L * 60 * 5 , 1000L * 60 * 30 );
157
157
// Submit the data every 30 minutes, first time after 5 minutes to give other plugins enough time to start
0 commit comments