Skip to content

Commit 4346c09

Browse files
committed
Detect paper, spigot is outdated a long time ago.
Add MythicMobs integration
1 parent 56c84f5 commit 4346c09

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/think/rpgitems/RPGItems.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import think.rpgitems.power.*;
1919
import think.rpgitems.power.trigger.BaseTriggers;
2020
import think.rpgitems.power.trigger.Trigger;
21+
import think.rpgitems.support.MythicMobsSupport;
2122
import think.rpgitems.support.PlaceholderAPISupport;
2223
import think.rpgitems.support.ResidenceSupport;
2324
import think.rpgitems.support.WGSupport;
@@ -130,6 +131,7 @@ public void onLoad() {
130131
saveDefaultConfig();
131132
Font.load();
132133
PlaceholderAPISupport.init(this);
134+
MythicMobsSupport.init(this);
133135
WGSupport.load();
134136
loadExtensions();
135137
}
@@ -188,15 +190,15 @@ public void onEnable() {
188190
//may null in test environment
189191
if (implementationVersion != null && implementationVersion.startsWith("git-Bukkit-")) {
190192
Bukkit.getConsoleSender().sendMessage(ChatColor.RED + "======================================");
191-
Bukkit.getConsoleSender().sendMessage(ChatColor.RED + "RPGItems plugin requires Spigot API, Please make sure you are using Spigot.");
193+
Bukkit.getConsoleSender().sendMessage(ChatColor.RED + "RPGItems plugin requires Paper API, Please make sure you are using Paper.");
192194
Bukkit.getConsoleSender().sendMessage(ChatColor.RED + "======================================");
193195
}
194196
try {
195-
Bukkit.spigot();
197+
Class.forName("io.papermc.paper.ServerBuildInfo");
196198
} catch (Throwable e) {
197199
getCommand("rpgitem").setExecutor((sender, command, label, args) -> {
198200
sender.sendMessage(ChatColor.RED + "======================================");
199-
sender.sendMessage(ChatColor.RED + "RPGItems plugin requires Spigot API, Please make sure you are using Spigot.");
201+
sender.sendMessage(ChatColor.RED + "RPGItems plugin requires Paper API, Please make sure you are using Paper.");
200202
sender.sendMessage(ChatColor.RED + "======================================");
201203
return true;
202204
});

0 commit comments

Comments
 (0)