Skip to content

Commit 40d5e5c

Browse files
committed
use AddonParent
1 parent e4538cb commit 40d5e5c

File tree

2 files changed

+10
-114
lines changed

2 files changed

+10
-114
lines changed

pom.xml

Lines changed: 8 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7-
<groupId>me.hsgamer.bettergui</groupId>
7+
<parent>
8+
<groupId>me.hsgamer.bettergui</groupId>
9+
<artifactId>addon-parent</artifactId>
10+
<version>1.0-SNAPSHOT</version>
11+
</parent>
12+
813
<artifactId>ExampleAddon</artifactId>
914
<version>1.0-SNAPSHOT</version>
1015
<packaging>jar</packaging>
@@ -13,79 +18,13 @@
1318
<description>An Example addon for BetterGUI</description>
1419

1520
<properties>
16-
<java.version>1.8</java.version>
17-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1821
<project.mainClass>me.hsgamer.bettergui.exampleaddon.ExampleAddon</project.mainClass>
1922
</properties>
2023

21-
<build>
22-
<defaultGoal>clean package</defaultGoal>
23-
<plugins>
24-
<plugin>
25-
<groupId>org.apache.maven.plugins</groupId>
26-
<artifactId>maven-compiler-plugin</artifactId>
27-
<version>3.10.1</version>
28-
<configuration>
29-
<source>${java.version}</source>
30-
<target>${java.version}</target>
31-
</configuration>
32-
</plugin>
33-
<plugin>
34-
<groupId>org.apache.maven.plugins</groupId>
35-
<artifactId>maven-shade-plugin</artifactId>
36-
<version>3.3.0</version>
37-
<executions>
38-
<execution>
39-
<phase>package</phase>
40-
<goals>
41-
<goal>shade</goal>
42-
</goals>
43-
<configuration>
44-
<createDependencyReducedPom>false</createDependencyReducedPom>
45-
</configuration>
46-
</execution>
47-
</executions>
48-
</plugin>
49-
</plugins>
50-
<resources>
51-
<resource>
52-
<directory>src/main/resources</directory>
53-
<filtering>true</filtering>
54-
</resource>
55-
</resources>
56-
</build>
57-
5824
<repositories>
5925
<repository>
60-
<id>papermc-repo</id>
61-
<url>https://papermc.io/repo/repository/maven-public/</url>
62-
</repository>
63-
<repository>
64-
<id>sonatype</id>
65-
<url>https://oss.sonatype.org/content/groups/public/</url>
66-
</repository>
67-
<repository>
68-
<id>codemc-releases</id>
69-
<url>https://repo.codemc.io/repository/maven-releases/</url>
70-
</repository>
71-
<repository>
72-
<id>codemc-snapshots</id>
73-
<url>https://repo.codemc.io/repository/maven-snapshots/</url>
26+
<id>codemc-public</id>
27+
<url>https://repo.codemc.io/repository/maven-public/</url>
7428
</repository>
7529
</repositories>
76-
77-
<dependencies>
78-
<dependency>
79-
<groupId>com.destroystokyo.paper</groupId>
80-
<artifactId>paper-api</artifactId>
81-
<version>1.12.2-R0.1-SNAPSHOT</version>
82-
<scope>provided</scope>
83-
</dependency>
84-
<dependency>
85-
<groupId>me.HSGamer</groupId>
86-
<artifactId>BetterGUI</artifactId>
87-
<version>6.5</version>
88-
<scope>provided</scope>
89-
</dependency>
90-
</dependencies>
9130
</project>
Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,6 @@
11
package me.hsgamer.bettergui.exampleaddon;
22

3-
import me.hsgamer.bettergui.api.addon.BetterGUIAddon;
3+
import me.hsgamer.hscore.bukkit.addon.PluginAddon;
44

5-
public final class ExampleAddon extends BetterGUIAddon {
6-
7-
/**
8-
* Called when loading the addon
9-
*
10-
* @return whether the addon is loaded properly
11-
*/
12-
@Override
13-
public boolean onLoad() {
14-
return true;
15-
}
16-
17-
/**
18-
* Called when enabling the addon
19-
*/
20-
@Override
21-
public void onEnable() {
22-
// Enable logic
23-
}
24-
25-
/**
26-
* Called after all addons were loaded
27-
*/
28-
@Override
29-
public void onPostEnable() {
30-
// Post Enable logic
31-
}
32-
33-
/**
34-
* Called when disabling the addon
35-
*/
36-
@Override
37-
public void onDisable() {
38-
// Disable logic
39-
}
40-
41-
42-
/**
43-
* Called when reloading
44-
*/
45-
@Override
46-
public void onReload() {
47-
// Reload logic
48-
}
5+
public final class ExampleAddon extends PluginAddon {
496
}

0 commit comments

Comments
 (0)