mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Small refactoring
This commit is contained in:
parent
dd159184a4
commit
c93c6cfa68
589
pom.xml
589
pom.xml
@ -1,329 +1,338 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
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>me.mrCookieSlime</groupId>
|
||||
<artifactId>Slimefun</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>me.mrCookieSlime</groupId>
|
||||
<artifactId>Slimefun</artifactId>
|
||||
|
||||
<!-- Our default version will be UNOFFICIAL, this will prevent auto updates -->
|
||||
<!-- from overriding our local test file -->
|
||||
<version>4.3-UNOFFICIAL</version>
|
||||
<!-- Our default version will be UNOFFICIAL, this will prevent auto updates -->
|
||||
<!-- from overriding our local test file -->
|
||||
<version>4.3-UNOFFICIAL</version>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
||||
<!-- Bukkit properties -->
|
||||
<bukkit.version>1.15.2</bukkit.version>
|
||||
<bukkit.javadocs>https://hub.spigotmc.org/javadocs/bukkit/</bukkit.javadocs>
|
||||
<!-- Bukkit properties -->
|
||||
<bukkit.version>1.15.2</bukkit.version>
|
||||
<bukkit.javadocs>https://hub.spigotmc.org/javadocs/bukkit/</bukkit.javadocs>
|
||||
|
||||
<!-- Default settings for sonarcloud.io -->
|
||||
<sonar.projectKey>TheBusyBiscuit_Slimefun4</sonar.projectKey>
|
||||
<sonar.organization>thebusybiscuit-github</sonar.organization>
|
||||
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
|
||||
<sonar.coverage.jacoco.xmlReportPaths>target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
|
||||
</properties>
|
||||
<!-- Default settings for sonarcloud.io -->
|
||||
<sonar.projectKey>TheBusyBiscuit_Slimefun4</sonar.projectKey>
|
||||
<sonar.organization>thebusybiscuit-github</sonar.organization>
|
||||
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
|
||||
<sonar.coverage.jacoco.xmlReportPaths>target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
|
||||
</properties>
|
||||
|
||||
<issueManagement>
|
||||
<system>GitHub</system>
|
||||
<url>https://github.com/TheBusyBiscuit/Slimefun4/issues</url>
|
||||
</issueManagement>
|
||||
<issueManagement>
|
||||
<system>GitHub Issues</system>
|
||||
<url>https://github.com/TheBusyBiscuit/Slimefun4/issues</url>
|
||||
</issueManagement>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>paper-repo</id>
|
||||
<url>https://repo.destroystokyo.com/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>worldedit-worldguard-repo</id>
|
||||
<url>https://maven.sk89q.com/repo/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>bStats-repo</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>placeholderapi-repo</id>
|
||||
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU General Public License v3.0</name>
|
||||
<url>https://github.com/TheBusyBiscuit/Slimefun4/blob/master/LICENSE</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
|
||||
<testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>paper-repo</id>
|
||||
<url>https://repo.destroystokyo.com/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>worldedit-worldguard-repo</id>
|
||||
<url>https://maven.sk89q.com/repo/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>bStats-repo</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>placeholderapi-repo</id>
|
||||
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<finalName>${project.name} v${project.version}</finalName>
|
||||
<build>
|
||||
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
|
||||
<testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
|
||||
|
||||
<plugins>
|
||||
<!-- Compiler plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<!-- package info files are only important to the Javadocs -->
|
||||
<!-- We can exclude them from the final jar -->
|
||||
<exclude>**/package-info.java</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<finalName>${project.name} v${project.version}</finalName>
|
||||
|
||||
<!-- Attach sources -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugins>
|
||||
<!-- Compiler plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<!-- package info files are only important for Javadocs -->
|
||||
<!-- We can safely exclude them from the final jar -->
|
||||
<exclude>**/package-info.java</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Plugin for Unit Tests -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M4</version>
|
||||
</plugin>
|
||||
<!-- Attach sources -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Sonarcloud Scanner -->
|
||||
<plugin>
|
||||
<groupId>org.sonarsource.scanner.maven</groupId>
|
||||
<artifactId>sonar-maven-plugin</artifactId>
|
||||
<version>3.7.0.1746</version>
|
||||
</plugin>
|
||||
<!-- Plugin for Unit Tests -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M4</version>
|
||||
</plugin>
|
||||
|
||||
<!-- Code Coverage Reports -->
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.8.5</version>
|
||||
<!-- Sonarcloud Scanner -->
|
||||
<plugin>
|
||||
<groupId>org.sonarsource.scanner.maven</groupId>
|
||||
<artifactId>sonar-maven-plugin</artifactId>
|
||||
<version>3.7.0.1746</version>
|
||||
</plugin>
|
||||
|
||||
<executions>
|
||||
<execution>
|
||||
<id>prepare</id>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<!-- Code Coverage Reports -->
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.8.5</version>
|
||||
|
||||
<execution>
|
||||
<id>report</id>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>prepare</id>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
<!-- Dependency shading -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.3</version>
|
||||
<execution>
|
||||
<id>report</id>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<configuration>
|
||||
<!-- Dependency shading -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.3</version>
|
||||
|
||||
<!-- Shade bStats and CS-CoreLib2 into the output jar -->
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>org.bstats</pattern>
|
||||
<shadedPattern>me.mrCookieSlime.Slimefun.bstats</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>io.github.thebusybiscuit.cscorelib2</pattern>
|
||||
<shadedPattern>me.mrCookieSlime.Slimefun.cscorelib2</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
<configuration>
|
||||
|
||||
<!-- Exclude unneeded metadata files from shaded dependencies -->
|
||||
<filters>
|
||||
<filter>
|
||||
<artifact>*:*</artifact>
|
||||
<excludes>
|
||||
<exclude>META-INF/*</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
</configuration>
|
||||
<!-- Shade bStats and CS-CoreLib2 into the output jar -->
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>org.bstats</pattern>
|
||||
<shadedPattern>me.mrCookieSlime.Slimefun.bstats</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>io.github.thebusybiscuit.cscorelib2</pattern>
|
||||
<shadedPattern>me.mrCookieSlime.Slimefun.cscorelib2</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Exclude unneeded metadata files from shaded dependencies -->
|
||||
<filters>
|
||||
<filter>
|
||||
<artifact>*:*</artifact>
|
||||
<excludes>
|
||||
<exclude>META-INF/*</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
</configuration>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<configuration>
|
||||
<reportOutputDirectory>${project.basedir}</reportOutputDirectory>
|
||||
<destDir>docs</destDir>
|
||||
<!-- Javadocs Settings -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
|
||||
<doctitle>Slimefun4 - Javadocs</doctitle>
|
||||
<windowtitle>Slimefun4 - Javadocs</windowtitle>
|
||||
<detectOfflineLinks>false</detectOfflineLinks>
|
||||
<additionalJOption>-html5</additionalJOption>
|
||||
<configuration>
|
||||
<reportOutputDirectory>${project.basedir}</reportOutputDirectory>
|
||||
<destDir>docs</destDir>
|
||||
|
||||
<!-- We can reference Bukkit's API in our Javadocs -->
|
||||
<links>
|
||||
<link>${bukkit.javadocs}</link>
|
||||
</links>
|
||||
<doctitle>Slimefun4 - Javadocs</doctitle>
|
||||
<windowtitle>Slimefun4 - Javadocs</windowtitle>
|
||||
<detectOfflineLinks>false</detectOfflineLinks>
|
||||
<additionalJOption>-html5</additionalJOption>
|
||||
|
||||
<!-- We can group pakages together in our Javadocs -->
|
||||
<groups>
|
||||
<group>
|
||||
<title>Slimefun4 - API</title>
|
||||
<packages>io.github.thebusybiscuit.slimefun4.api*</packages>
|
||||
</group>
|
||||
<group>
|
||||
<title>Slimefun4 - Core packages</title>
|
||||
<packages>io.github.thebusybiscuit.slimefun4.core*</packages>
|
||||
</group>
|
||||
<group>
|
||||
<title>Slimefun4 - Implementations</title>
|
||||
<packages>io.github.thebusybiscuit.slimefun4.implementation*</packages>
|
||||
</group>
|
||||
<group>
|
||||
<title>Slimefun4 - Common utility packages</title>
|
||||
<packages>io.github.thebusybiscuit.slimefun4.utils*</packages>
|
||||
</group>
|
||||
<group>
|
||||
<title>Slimefun4 - Item Implementations</title>
|
||||
<packages>io.github.thebusybiscuit.slimefun4.implementation.items*</packages>
|
||||
</group>
|
||||
<group>
|
||||
<title>Slimefun4 - Old packages</title>
|
||||
<packages>me.mrCookieSlime.Slimefun*</packages>
|
||||
</group>
|
||||
</groups>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!-- We can reference Bukkit's API in our Javadocs -->
|
||||
<links>
|
||||
<link>${bukkit.javadocs}</link>
|
||||
</links>
|
||||
|
||||
<resources>
|
||||
<!-- We can group pakages together in our Javadocs -->
|
||||
<groups>
|
||||
<group>
|
||||
<title>Slimefun4 - API</title>
|
||||
<packages>io.github.thebusybiscuit.slimefun4.api*</packages>
|
||||
</group>
|
||||
<group>
|
||||
<title>Slimefun4 - Core packages</title>
|
||||
<packages>io.github.thebusybiscuit.slimefun4.core*</packages>
|
||||
</group>
|
||||
<group>
|
||||
<title>Slimefun4 - Implementations</title>
|
||||
<packages>io.github.thebusybiscuit.slimefun4.implementation*</packages>
|
||||
</group>
|
||||
<group>
|
||||
<title>Slimefun4 - Common utility packages</title>
|
||||
<packages>io.github.thebusybiscuit.slimefun4.utils*</packages>
|
||||
</group>
|
||||
<group>
|
||||
<title>Slimefun4 - Item Implementations</title>
|
||||
<packages>io.github.thebusybiscuit.slimefun4.implementation.items*</packages>
|
||||
</group>
|
||||
<group>
|
||||
<title>Slimefun4 - Old packages</title>
|
||||
<packages>me.mrCookieSlime.Slimefun*</packages>
|
||||
</group>
|
||||
</groups>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<!-- Resources we want to include, such as configs or language files -->
|
||||
<resource>
|
||||
<directory>${basedir}/src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<resources>
|
||||
|
||||
<includes>
|
||||
<include>*</include>
|
||||
<include>languages/*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<!-- Resources we want to include, e.g. configs or language files -->
|
||||
<resource>
|
||||
<directory>${basedir}/src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
|
||||
<!-- We also want to include our LICENSE file -->
|
||||
<resource>
|
||||
<directory>${basedir}</directory>
|
||||
<includes>
|
||||
<include>*</include>
|
||||
<include>languages/*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
|
||||
<includes>
|
||||
<include>LICENSE</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
<!-- We also want to include our LICENSE file -->
|
||||
<resource>
|
||||
<directory>${basedir}</directory>
|
||||
|
||||
<dependencies>
|
||||
<!-- Hard dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>${bukkit.version}-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.TheBusyBiscuit</groupId>
|
||||
<artifactId>CS-CoreLib</artifactId>
|
||||
<version>8081bb4fe4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<includes>
|
||||
<include>LICENSE</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
<!-- Development / Testing dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>5.5.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.seeseemelk</groupId>
|
||||
<artifactId>MockBukkit</artifactId>
|
||||
<version>v1.15-279489afe1-1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>3.3.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependencies>
|
||||
<!-- Hard dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>${bukkit.version}-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.TheBusyBiscuit</groupId>
|
||||
<artifactId>CS-CoreLib</artifactId>
|
||||
<version>8081bb4fe4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Shaded packages -->
|
||||
<dependency>
|
||||
<groupId>com.github.thebusybiscuit</groupId>
|
||||
<artifactId>CS-CoreLib2</artifactId>
|
||||
<version>0.18</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bstats</groupId>
|
||||
<artifactId>bstats-bukkit</artifactId>
|
||||
<version>1.7</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- Development / Testing dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>5.5.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.seeseemelk</groupId>
|
||||
<artifactId>MockBukkit</artifactId>
|
||||
<version>v1.15-279489afe1-1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>3.3.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Third party plugin integrations -->
|
||||
<dependency>
|
||||
<groupId>com.sk89q.worldedit</groupId>
|
||||
<artifactId>worldedit-bukkit</artifactId>
|
||||
<version>7.1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
<version>2.10.6</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.TheBusyBiscuit</groupId>
|
||||
<artifactId>EmeraldEnchants2</artifactId>
|
||||
<version>3cd370b5d8</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- Shaded packages -->
|
||||
<dependency>
|
||||
<groupId>com.github.thebusybiscuit</groupId>
|
||||
<artifactId>CS-CoreLib2</artifactId>
|
||||
<version>0.18</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bstats</groupId>
|
||||
<artifactId>bstats-bukkit</artifactId>
|
||||
<version>1.7</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- System dependency, this project has no maven repository -->
|
||||
<dependency>
|
||||
<groupId>me.minebuilders</groupId>
|
||||
<artifactId>clearlag-core</artifactId>
|
||||
<version>2.9.7</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/Clearlag.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!-- Third party plugin integrations -->
|
||||
<dependency>
|
||||
<groupId>com.sk89q.worldedit</groupId>
|
||||
<artifactId>worldedit-bukkit</artifactId>
|
||||
<version>7.1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
<version>2.10.6</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.TheBusyBiscuit</groupId>
|
||||
<artifactId>EmeraldEnchants2</artifactId>
|
||||
<version>3cd370b5d8</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- System dependency, this project has no maven repository -->
|
||||
<dependency>
|
||||
<groupId>me.minebuilders</groupId>
|
||||
<artifactId>clearlag-core</artifactId>
|
||||
<version>2.9.7</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/Clearlag.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@ -130,10 +130,6 @@ public class SlimefunRegistry {
|
||||
return enabledItems;
|
||||
}
|
||||
|
||||
public int countNonAddonItems() {
|
||||
return (int) getEnabledSlimefunItems().stream().filter(item -> !item.isAddonItem()).count();
|
||||
}
|
||||
|
||||
public List<Research> getResearches() {
|
||||
return researches;
|
||||
}
|
||||
|
@ -87,13 +87,13 @@ public final class PostSetup {
|
||||
CommandSender sender = Bukkit.getConsoleSender();
|
||||
|
||||
int total = SlimefunPlugin.getRegistry().getEnabledSlimefunItems().size();
|
||||
int vanilla = SlimefunPlugin.getRegistry().countNonAddonItems();
|
||||
int slimefunOnly = countNonAddonItems();
|
||||
|
||||
sender.sendMessage("");
|
||||
sender.sendMessage(ChatColor.GREEN + "######################### - Slimefun v" + SlimefunPlugin.getVersion() + " - #########################");
|
||||
sender.sendMessage("");
|
||||
sender.sendMessage(ChatColor.GREEN + "Successfully loaded " + total + " Items and " + SlimefunPlugin.getRegistry().getResearches().size() + " Researches");
|
||||
sender.sendMessage(ChatColor.GREEN + "( " + vanilla + " Items from Slimefun, " + (total - vanilla) + " Items from " + SlimefunPlugin.getInstalledAddons().size() + " Addons )");
|
||||
sender.sendMessage(ChatColor.GREEN + "( " + slimefunOnly + " Items from Slimefun, " + (total - slimefunOnly) + " Items from " + SlimefunPlugin.getInstalledAddons().size() + " Addons )");
|
||||
sender.sendMessage("");
|
||||
sender.sendMessage(ChatColor.GREEN + "Slimefun is an Open-Source project that is kept alive by a large community.");
|
||||
sender.sendMessage(ChatColor.GREEN + "Consider helping us maintain this project by contributing on GitHub!");
|
||||
@ -117,6 +117,10 @@ public final class PostSetup {
|
||||
SlimefunPlugin.getRegistry().setAutoLoadingMode(true);
|
||||
}
|
||||
|
||||
private static int countNonAddonItems() {
|
||||
return (int) SlimefunPlugin.getRegistry().getEnabledSlimefunItems().stream().filter(item -> item.getAddon() instanceof SlimefunPlugin).count();
|
||||
}
|
||||
|
||||
private static void loadAutomaticCraftingChamber() {
|
||||
AutomatedCraftingChamber crafter = (AutomatedCraftingChamber) SlimefunItems.AUTOMATED_CRAFTING_CHAMBER.getItem();
|
||||
|
||||
|
@ -275,15 +275,6 @@ public class SlimefunItem implements Placeable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns whether this {@link SlimefunItem} was added by an addon.
|
||||
*
|
||||
* @return Whether this {@link SlimefunItem} was added by an addon.
|
||||
*/
|
||||
public final boolean isAddonItem() {
|
||||
return !(addon instanceof SlimefunPlugin);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns whether this {@link SlimefunItem} is disabled.
|
||||
*
|
||||
|
@ -103,7 +103,7 @@ import me.mrCookieSlime.Slimefun.api.inventory.UniversalBlockMenu;
|
||||
* @author TheBusyBiscuit
|
||||
*
|
||||
*/
|
||||
public class SlimefunPlugin extends JavaPlugin implements SlimefunAddon {
|
||||
public final class SlimefunPlugin extends JavaPlugin implements SlimefunAddon {
|
||||
|
||||
public static SlimefunPlugin instance;
|
||||
|
||||
|
@ -48,7 +48,6 @@ public class TestSlimefunItemRegistration {
|
||||
Assertions.assertEquals(ItemState.ENABLED, item.getState());
|
||||
Assertions.assertFalse(item.isDisabled());
|
||||
Assertions.assertEquals(id, item.getID());
|
||||
Assertions.assertFalse(item.isAddonItem());
|
||||
Assertions.assertEquals(item, SlimefunItem.getByID(id));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user