Skip to content

Commit

Permalink
bStats integration
Browse files Browse the repository at this point in the history
  • Loading branch information
SocketByte committed Apr 1, 2018
1 parent ae15360 commit 340a30c
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 0 deletions.
32 changes: 32 additions & 0 deletions OpenSectorLinker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,32 @@
<packaging>jar</packaging>
<artifactId>OpenSectorLinker</artifactId>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<relocations>
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>pl.socketbyte.opensectors.linker</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>spigot-repo</id>
Expand All @@ -20,6 +46,12 @@
</repositories>

<dependencies>
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryonet.Client;
import com.esotericsoftware.minlog.Log;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.WorldBorder;
Expand Down Expand Up @@ -239,5 +240,8 @@ public static void ready() {
worldBorder.setSize((config.border - 25) * 2); // im genius XD
worldBorder.setCenter(0, 0);
log().info("Ready!");

log().info("Running metrics...");
Metrics metrics = new Metrics(OpenSectorLinker.getInstance());
}
}
32 changes: 32 additions & 0 deletions OpenSectorSystem/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,32 @@
<packaging>jar</packaging>
<artifactId>OpenSectorSystem</artifactId>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<relocations>
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>pl.socketbyte.opensectors.system</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>bungeecord-repo</id>
Expand All @@ -20,6 +46,12 @@
</repositories>

<dependencies>
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bungeecord</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.esotericsoftware.minlog.Log;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.plugin.Plugin;
import org.bstats.bungeecord.Metrics;
import pl.socketbyte.opensectors.linker.packet.PacketSendMessage;
import pl.socketbyte.opensectors.system.adapters.*;
import pl.socketbyte.opensectors.system.api.IPacketAdapter;
Expand Down Expand Up @@ -221,6 +222,9 @@ public void onEnable() {
TaskManager.getExecutor().scheduleAtFixedRate(
new BukkitWeatherSynchronizer(), 0, getConfig().bukkitTimeFrequency, TimeUnit.MILLISECONDS);
logger.info("Ready!");

logger.info("Running metrics...");
Metrics metrics = new Metrics(this);
}

public void close() {
Expand Down
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
</build>

<repositories>
<repository>
<id>bstats-repo</id>
<url>http://repo.bstats.org/content/repositories/releases/</url>
</repository>
<repository>
<id>socketbyte-repo</id>
<url>http://repo.socketbyte.pl/repository/nexus-releases</url>
Expand Down

0 comments on commit 340a30c

Please sign in to comment.