implement bstats

This commit is contained in:
Minecon724 2022-01-31 12:37:41 +01:00
parent af78559783
commit 051ce266ef
2 changed files with 33 additions and 0 deletions

30
pom.xml
View File

@ -23,6 +23,12 @@
<version>1.18.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>2.2.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
@ -32,5 +38,29 @@
<filtering>true</filtering>
</resource>
</resources>
<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>
<!-- Replace this with your package! -->
<shadedPattern>pl.minecon724.giants</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -10,6 +10,7 @@ import java.util.Map.Entry;
import java.util.Random;
import org.apache.commons.lang.StringUtils;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.configuration.file.FileConfiguration;
@ -33,6 +34,8 @@ public class Main extends JavaPlugin implements Listener {
File configFile = new File(getDataFolder(), "config.yml");
FileConfiguration config;
Metrics metrics = new Metrics(this, 14131);
Random rnd = new Random();
List<LivingEntity> giants = new ArrayList<LivingEntity>();