A library that helps developing Slimefun addons and translate Slimefun addons to Simplified Chinese.
一个帮助粘液科技附属开发,并可以汉化粘液附属的库。
Actually, there is almost no difference. However, the implementation of the SlimefunAddon class is separate from the AbstractAddon class, and of course there is InfinityLib class as well. This will be very useful for plugins that want to use InfinityLib and GuizhanLib simultaneously without having to call the Slimefun API class. This way, we can place Slimefun in a soft-depend position in the Bukkit configuration file plugin.yml.
Add GuizhanLib-api
(which includes all sub modules) or respective modules as dependency (Maven for example):
将GuizhanLib-api
(包含所有包)或者指定的包添加为依赖项(以 Maven 为例):
<dependency>
<groupId>net.guizhanss</groupId>
<artifactId>GuizhanLib-api</artifactId>
<version>REPLACE WITH VERSION</version>
<scope>compile</scope>
</dependency>
You will need to relocate the library classes if you use it for addon development.
在build
中,你需要将GuizhanLib迁移到你的包中,避免与其他插件中使用的GuizhanLib冲突
(如果已存在maven-shade-plugin
的配置,只需要添加relocation即可:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<!-- Add the following field to remove all unused classes and reduce the size of generated jar file. Not required, but recommended -->
<!-- 你可以添加下面这一行,去除所有库中未使用的类,来减少生成jar的大小,非必须,但建议开启 -->
<minimizeJar>true</minimizeJar>
<relocations>
<!-- IMPORTANT: add the following relocation -->
<!-- 重要: 你需要将以下relocation(迁移)部分添加到你的pom.xml中 -->
<relocation>
<pattern>net.guizhanss.guizhanlib</pattern>
<shadedPattern>(YOUR PACKAGE NAME HERE).guizhanlib</shadedPattern>
</relocation>
<relocation>
<pattern>id.arvin3108.standalone</pattern>
<shadedPattern>(YOUR PACKAGE NAME HERE).standalone</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
The changelog is only available in Chinese.