Skip to content

Commit

Permalink
- fixes
Browse files Browse the repository at this point in the history
- added bstats
  • Loading branch information
Grzybol committed Jul 23, 2024
1 parent d6c48e3 commit 9a02f99
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 17 deletions.
62 changes: 45 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>betterbox.mine.game</groupId>
<artifactId>BetterElo</artifactId>
<version>4.6.61-SNAPSHOT</version>
<version>4.7.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BetterElo</name>
Expand All @@ -18,6 +18,32 @@

<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>
<!-- Replace this with your package! -->
<shadedPattern>betterbox.mine.game.betterelo</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -30,6 +56,7 @@
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -40,22 +67,9 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>




<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -113,28 +127,34 @@
</repositories>

<dependencies>


<dependency>
<groupId>me.filoghost.holographicdisplays</groupId>
<artifactId>holographicdisplays-api</artifactId>
<version>3.0.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bukkit</artifactId>
<version>4.3.2</version>
</dependency>

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.4.43.v20210629</version>
</dependency>

<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.18.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
Expand All @@ -156,5 +176,13 @@
<version>7.0.4</version> <!-- Zaktualizuj do wersji kompatybilnej z Twoim serwerem -->
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>3.0.2</version>
<scope>compile</scope>
</dependency>

</dependencies>
</project>
3 changes: 3 additions & 0 deletions src/main/java/betterbox/mine/game/betterelo/BetterElo.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.sk89q.worldguard.WorldGuard;
import com.sk89q.worldguard.protection.flags.Flags;
import me.clip.placeholderapi.libs.kyori.adventure.platform.facet.Facet;
import org.bstats.bukkit.Metrics;
import org.bukkit.*;
import org.bukkit.attribute.Attribute;
import org.bukkit.configuration.file.FileConfiguration;
Expand Down Expand Up @@ -81,6 +82,8 @@ public void onLoad() {

@Override
public void onEnable() {
int pluginId = 22747; // Zamień na rzeczywisty ID twojego pluginu na bStats
Metrics metrics = new Metrics(this, pluginId);
this.mobDefenseKey = new NamespacedKey(this, "mob_defense");
this.mobDamageKey = new NamespacedKey(this, "mob_damage");
this.averageDamageKey = new NamespacedKey(this, "average_damage");
Expand Down

0 comments on commit 9a02f99

Please sign in to comment.