Skip to content

Commit 9abeced

Browse files
committed
Updated bStats to 1.3 and small fix
1 parent 99fa504 commit 9abeced

File tree

2 files changed

+22
-28
lines changed

2 files changed

+22
-28
lines changed

pom.xml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
43
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
54
<modelVersion>4.0.0</modelVersion>
65

76
<groupId>com.xxmicloxx</groupId>
87
<artifactId>NoteBlockAPI</artifactId>
9-
<version>1.2.3</version>
8+
<version>1.2.3.1</version>
109
<name>NoteBlockAPI</name>
1110

1211
<properties>
@@ -21,8 +20,8 @@
2120
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
2221
</repository>
2322
<repository>
24-
<id>bstats-repo</id>
25-
<url>http://repo.bstats.org/content/repositories/releases/</url>
23+
<id>jitpack.io</id>
24+
<url>https://jitpack.io</url>
2625
</repository>
2726
</repositories>
2827

@@ -34,9 +33,10 @@
3433
<scope>provided</scope>
3534
</dependency>
3635
<dependency>
37-
<groupId>org.bstats</groupId>
36+
<groupId>org.bstats.bStats-Metrics</groupId>
3837
<artifactId>bstats-bukkit</artifactId>
39-
<version>1.2</version>
38+
<version>1.3</version>
39+
<scope>compile</scope>
4040
</dependency>
4141
</dependencies>
4242

@@ -70,13 +70,8 @@
7070
<plugin>
7171
<groupId>org.apache.maven.plugins</groupId>
7272
<artifactId>maven-shade-plugin</artifactId>
73-
<version>2.3</version>
73+
<version>3.1.0</version>
7474
<configuration>
75-
<artifactSet>
76-
<includes>
77-
<include>org.bstats:*</include>
78-
</includes>
79-
</artifactSet>
8075
<relocations>
8176
<relocation>
8277
<pattern>org.bstats</pattern>

src/main/java/com/xxmicloxx/NoteBlockAPI/NoteBlockAPI.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import org.bukkit.plugin.Plugin;
1717
import org.bukkit.plugin.RegisteredListener;
1818
import org.bukkit.plugin.java.JavaPlugin;
19-
import org.bukkit.scheduler.BukkitRunnable;
2019

2120
import com.xxmicloxx.NoteBlockAPI.songplayer.SongPlayer;
2221
import com.xxmicloxx.NoteBlockAPI.utils.MathUtils;
@@ -101,18 +100,7 @@ public void onEnable() {
101100
}
102101
}
103102

104-
Metrics metrics = new Metrics(this);
105-
106-
metrics.addCustomChart(new Metrics.DrilldownPie("deprecated", () -> {
107-
Map<String, Map<String, Integer>> map = new HashMap<>();
108-
for (Plugin pl : dependentPlugins.keySet()){
109-
String deprecated = dependentPlugins.get(pl) ? "yes" : "no";
110-
Map<String, Integer> entry = new HashMap<>();
111-
entry.put(pl.getDescription().getFullName(), 1);
112-
map.put(deprecated, entry);
113-
}
114-
return map;
115-
}));
103+
Metrics metrics = new Metrics(this);
116104

117105
new NoteBlockPlayerMain().onEnable();
118106

@@ -141,10 +129,21 @@ public void run() {
141129

142130
}
143131
}
132+
133+
metrics.addCustomChart(new Metrics.DrilldownPie("deprecated", () -> {
134+
Map<String, Map<String, Integer>> map = new HashMap<>();
135+
for (Plugin pl : dependentPlugins.keySet()){
136+
String deprecated = dependentPlugins.get(pl) ? "yes" : "no";
137+
Map<String, Integer> entry = new HashMap<>();
138+
entry.put(pl.getDescription().getFullName(), 1);
139+
map.put(deprecated, entry);
140+
}
141+
return map;
142+
}));
144143
}
145-
}, 20*30);
144+
}, 1);
146145

147-
getServer().getScheduler().runTaskLater(this, new Runnable() {
146+
getServer().getScheduler().runTaskLaterAsynchronously(this, new Runnable() {
148147

149148
@Override
150149
public void run() {

0 commit comments

Comments
 (0)