Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@
<relocations>
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>me.ddggdd135.slimeae.libs</shadedPattern>
<shadedPattern>me.ddggdd135.slimeae.libs.bstats</shadedPattern>
</relocation>
<relocation>
<pattern>com.zaxxer.hikari</pattern>
<shadedPattern>me.ddggdd135.slimeae.libs.hikari</shadedPattern>
</relocation>
<relocation>
<pattern>net.byteflux.libby</pattern>
<shadedPattern>me.ddggdd135.slimeae.libs.libby</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>
Expand Down Expand Up @@ -116,7 +120,7 @@
<repository>
<!-- Spigot-API -->
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>papermc-repo</id>
Expand All @@ -136,6 +140,10 @@
<url>https://repo.codemc.org/repository/maven-public/</url>
<layout>default</layout>
</repository>
<repository>
<id>AlessioDP</id>
<url>https://repo.alessiodp.com/releases/</url>
</repository>
</repositories>

<dependencies>
Expand Down Expand Up @@ -199,7 +207,7 @@
<dependency>
<groupId>com.github.balugaq</groupId>
<artifactId>JustEnoughGuide</artifactId>
<version>3840a709aa</version>
<version>bd67e7e9f9</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -261,5 +269,17 @@
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.houbb</groupId>
<artifactId>pinyin</artifactId>
<version>0.4.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.byteflux</groupId>
<artifactId>libby-bukkit</artifactId>
<version>1.3.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
26 changes: 26 additions & 0 deletions src/main/java/me/ddggdd135/slimeae/SlimeAEPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
import me.ddggdd135.slimeae.tasks.*;
import me.ddggdd135.slimeae.utils.RecipeUtils;
import me.ddggdd135.slimeae.utils.SlimefunItemUtils;
import net.byteflux.libby.BukkitLibraryManager;
import net.byteflux.libby.Library;
import net.byteflux.libby.LibraryManager;
import net.guizhanss.minecraft.guizhanlib.updater.GuizhanUpdater;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
Expand Down Expand Up @@ -72,6 +75,8 @@ public final class SlimeAEPlugin extends JavaPlugin implements SlimefunAddon {
public void onEnable() {
instance = this;

loadLibraries();

networkData = new NetworkData();
infinityIntegration = new InfinityIntegration();
fluffyMachinesIntegration = new FluffyMachinesIntegration();
Expand Down Expand Up @@ -404,6 +409,27 @@ public static boolean isDebug() {
return debug;
}

private void loadLibraries() {
LibraryManager libraryManager = new BukkitLibraryManager(this);
libraryManager.addMavenCentral();

getLogger().info("正在加载 Pinyin");
Library pinyin = Library.builder()
.groupId("com{}github{}houbb")
.artifactId("pinyin")
.version("0.4.0")
.build();
libraryManager.loadLibrary(pinyin);

getLogger().info("正在加载 opencc4j");
Library opencc4j = Library.builder()
.groupId("com{}github{}houbb")
.artifactId("opencc4j")
.version("1.14.0")
.build();
libraryManager.loadLibrary(opencc4j);
}

public void reloadConfig0() {
// 保存默认配置
saveDefaultConfig();
Expand Down
Loading