Skip to content

Commit 11b3dd4

Browse files
authored
Merge pull request #9 from RhythmicSys/VillagerInfo-Rewrite
Add paper check
2 parents a62b1e6 + 41e3139 commit 11b3dd4

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/main/java/adhdmc/villagerinfo/Commands/SubCommands/HelpCommand.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import java.util.Map;
1212

1313
public class HelpCommand extends SubCommand {
14-
MiniMessage mM = MiniMessage.miniMessage();
1514

1615
public HelpCommand() {
1716
super("help", "VillagerInfo help", "/vill help");

src/main/java/adhdmc/villagerinfo/VillagerInfo.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ public final class VillagerInfo extends JavaPlugin {
3030
@Override
3131
public void onEnable() {
3232
plugin = this;
33+
try {
34+
Class.forName("net.kyori.adventure.text.minimessage.MiniMessage");
35+
Class.forName("com.destroystokyo.paper.entity.villager.Reputation");
36+
} catch (ClassNotFoundException e) {
37+
this.getLogger().severe("VillagerInfo relies on methods in classes not present on your server. Disabling plugin");
38+
this.getServer().getPluginManager().disablePlugin(this);
39+
}
3340
localeConfig = new LocaleConfig(this);
3441
localeConfig.getlocaleConfig();
3542
Metrics metrics = new Metrics(this, 13653);

0 commit comments

Comments
 (0)