plugin: add bstats telemetry before 0.3 release for feedback
This commit is contained in:
parent
034527c208
commit
e3afbdc3c7
12
pom.xml
12
pom.xml
@ -4,13 +4,19 @@
|
|||||||
<groupId>us.camin.regions</groupId>
|
<groupId>us.camin.regions</groupId>
|
||||||
<artifactId>Regions</artifactId>
|
<artifactId>Regions</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>0.2.99-rc4</version>
|
<version>0.2.99-rc5</version>
|
||||||
<name>regions</name>
|
<name>regions</name>
|
||||||
<url>http://maven.apache.org</url>
|
<url>http://maven.apache.org</url>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bstats</groupId>
|
||||||
|
<artifactId>bstats-bukkit</artifactId>
|
||||||
|
<version>2.2.1</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.comphenix.protocol</groupId>
|
<groupId>com.comphenix.protocol</groupId>
|
||||||
<artifactId>ProtocolLib</artifactId>
|
<artifactId>ProtocolLib</artifactId>
|
||||||
@ -87,6 +93,10 @@
|
|||||||
<pattern>io.papermc.lib</pattern>
|
<pattern>io.papermc.lib</pattern>
|
||||||
<shadedPattern>us.camin.regions.paperlib</shadedPattern> <!-- Replace this -->
|
<shadedPattern>us.camin.regions.paperlib</shadedPattern> <!-- Replace this -->
|
||||||
</relocation>
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>org.bstats</pattern>
|
||||||
|
<shadedPattern>us.camin.regions.bstats</shadedPattern>
|
||||||
|
</relocation>
|
||||||
</relocations>
|
</relocations>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
|
@ -23,8 +23,13 @@ import org.bukkit.configuration.Configuration;
|
|||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.configuration.serialization.ConfigurationSerialization;
|
import org.bukkit.configuration.serialization.ConfigurationSerialization;
|
||||||
|
import org.bukkit.World;
|
||||||
|
|
||||||
import org.dynmap.markers.MarkerAPI;
|
import org.dynmap.markers.MarkerAPI;
|
||||||
|
|
||||||
|
import org.bstats.bukkit.Metrics;
|
||||||
|
import org.bstats.charts.SingleLineChart;
|
||||||
|
|
||||||
import us.camin.regions.commands.RegionCommand;
|
import us.camin.regions.commands.RegionCommand;
|
||||||
import us.camin.regions.commands.RegionOpCommand;
|
import us.camin.regions.commands.RegionOpCommand;
|
||||||
import us.camin.regions.commands.RegionsCommand;
|
import us.camin.regions.commands.RegionsCommand;
|
||||||
@ -86,6 +91,17 @@ public class Plugin extends JavaPlugin {
|
|||||||
getServer().getPluginManager().registerEvents(new PlayerInventoryTeleporter(this, m_regions), this);
|
getServer().getPluginManager().registerEvents(new PlayerInventoryTeleporter(this, m_regions), this);
|
||||||
getServer().getPluginManager().registerEvents(new RegionPostItemWatcher(this, m_regions), this);
|
getServer().getPluginManager().registerEvents(new RegionPostItemWatcher(this, m_regions), this);
|
||||||
getServer().getPluginManager().registerEvents(new RegionPostInteractionWatcher(this, m_regions), this);
|
getServer().getPluginManager().registerEvents(new RegionPostInteractionWatcher(this, m_regions), this);
|
||||||
|
|
||||||
|
// PluginID is from bstats.org for CaminusRegions
|
||||||
|
Metrics metrics = new Metrics(this, 11705);
|
||||||
|
metrics.addCustomChart(new SingleLineChart("regions", () -> {
|
||||||
|
int allRegions = 0;
|
||||||
|
for(World w : getServer().getWorlds()) {
|
||||||
|
allRegions += m_regions.regionsForWorld(w).size();
|
||||||
|
}
|
||||||
|
return allRegions;
|
||||||
|
}
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadRegions() {
|
public void loadRegions() {
|
||||||
|
Loading…
Reference in New Issue
Block a user