Skip to content

Commit

Permalink
fix: plugin not properly being loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosgram committed Sep 13, 2022
1 parent 41adb83 commit 4af0ec5
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
26 changes: 25 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.oglofus</groupId>
<artifactId>gringotts-towny</artifactId>
<version>2.12.3</version>
<version>2.12.4-SNAPSHOT</version>

<properties>
<maven.deploy.skip>false</maven.deploy.skip>
Expand Down Expand Up @@ -38,6 +38,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -72,6 +75,26 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>
install
</phase>
<configuration>
<target>
<copy file="target\${project.artifactId}-${project.version}.jar" tofile="out\plugins\${project.artifactId}.jar"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand All @@ -93,6 +116,7 @@
<groupId>minecraftwars</groupId>
<artifactId>gringotts</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/oglofus/gringotts/towny/GringottsTowny.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import org.gestern.gringotts.Gringotts;
import org.gestern.gringotts.api.dependency.Dependency;

import java.io.File;
import java.io.InputStream;
Expand Down Expand Up @@ -37,6 +38,8 @@ public void onLoad() {
// load and init configuration
saveDefaultConfig(); // saves default configuration if no config.yml exists yet
reloadConfig();

Gringotts.instance.getDependencies().getDependency("towny").ifPresent(Dependency::onLoad);
}

@Override
Expand Down
5 changes: 4 additions & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ website: https://github.com/nikosgram/gringotts-towny
version: ${version}
main: com.oglofus.gringotts.towny.GringottsTowny

api-version: "1.19"

awareness:
- '!@UTF-8'
- !@UTF-8

depend:
- Gringotts
- Towny

loadbefore:
- Gringotts
- Towny

0 comments on commit 4af0ec5

Please sign in to comment.