Skip to content

Commit

Permalink
v1.14.0 - add bstats
Browse files Browse the repository at this point in the history
  • Loading branch information
Eredrim committed Jul 6, 2019
1 parent 1dacccc commit d3188a8
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 62 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# Maven
target/
dependency-reduced-pom.xml


/bin/
Expand Down
155 changes: 93 additions & 62 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,73 +1,104 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.slipcor</groupId>
<artifactId>pvparena</artifactId>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>net.slipcor</groupId>
<artifactId>pvparena</artifactId>
<version>1.14.0-SNAPSHOT</version>
<name>PVP Arena</name>
<name>PVP Arena</name>

<properties>
<buildVersion></buildVersion>
</properties>

<properties>
<buildVersion></buildVersion>
</properties>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
<repository>
<id>CodeMC</id>
<url>https://repo.codemc.org/repository/maven-public</url>
</repository>
</repositories>

<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.13.2-R0.1-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>1.5</version>
<scope>compile</scope>
</dependency>
</dependencies>

<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.13.2-R0.1-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
</dependencies>
<url>http://pa.slipcor.net</url>
<ciManagement>
<system>jenkins</system>
<url>https://ci2.craftyn.com</url>
</ciManagement>

<url>http://pa.slipcor.net</url>
<ciManagement>
<system>jenkins</system>
<url>https://ci2.craftyn.com</url>
</ciManagement>

<build>
<defaultGoal>clean package install</defaultGoal>
<build>
<defaultGoal>clean package install</defaultGoal>
<finalName>pvparena-${project.version}${buildVersion}</finalName>
<sourceDirectory>${basedir}/src</sourceDirectory>
<sourceDirectory>${basedir}/src</sourceDirectory>

<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src</directory>
<includes>
<include>config.yml</include>
<include>plugin.yml</include>
</includes>
</resource>
</resources>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src</directory>
<includes>
<include>config.yml</include>
<include>plugin.yml</include>
</includes>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
</plugin>
</plugins>
</build>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<relocations>
<relocation>
<pattern>org.bstats</pattern>
<!-- Replace this with your package! -->
<shadedPattern>net.slipcor.pvparena</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
4 changes: 4 additions & 0 deletions src/net/slipcor/pvparena/PVPArena.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import net.slipcor.pvparena.managers.ArenaManager;
import net.slipcor.pvparena.managers.StatisticsManager;
import net.slipcor.pvparena.updater.UpdateChecker;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
Expand Down Expand Up @@ -418,6 +419,9 @@ public void onEnable() {
instance = this;
DEBUG = new Debug(1);

//Enable bStats
Metrics metrics = new Metrics(this);

saveDefaultConfig();
if (!getConfig().contains("shortcuts")) {
final List<String> ffa = new ArrayList<>();
Expand Down

0 comments on commit d3188a8

Please sign in to comment.