Skip to content

Commit

Permalink
fix: fix the ancient sf warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 committed Sep 29, 2024
1 parent cab3d60 commit 13dec6f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/main/java/net/guizhanss/fastmachines/FastMachines.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,19 @@ private static FastMachines inst() {
return getInstance();
}

@Override
protected void load() {
// check sf version
if (!checkSlimefunVersion()) return;
}

@Override
public void enable() {
log(Level.INFO, "====================");
log(Level.INFO, " FastMachines ");
log(Level.INFO, " by ybw0014 ");
log(Level.INFO, "====================");

// check sf version
if (!checkSlimefunVersion()) return;

// registry
registry = new Registry();

Expand Down Expand Up @@ -160,10 +163,10 @@ private boolean checkSlimefunVersion() {
String sfVersion = getServer().getPluginManager().getPlugin("Slimefun").getDescription().getVersion();
if (sfVersion.startsWith("DEV - 1104")) {
for (int i = 0; i < 100; i++) {
log(Level.SEVERE, "You are using a damn ancient version of Slimefun, update Slimefun first!");
log(Level.SEVERE, "Download Slimefun from here: https://blob.build/project/Slimefun4/Dev");
log(Level.SEVERE, "Also join the Slimefun discord so you can get the announcements for new versions and will not be a primitive any more.");
log(Level.SEVERE, "https://discord.gg/slimefun");
getLogger().severe("You are using a damn ancient version of Slimefun, update Slimefun first!");
getLogger().severe("Download Slimefun from here: https://blob.build/project/Slimefun4/Dev");
getLogger().severe("Also join the Slimefun discord so you can get the announcements for new versions and will not be a primitive any more.");
getLogger().severe("https://discord.gg/slimefun");
}
getServer().getPluginManager().disablePlugin(this);
return false;
Expand Down

0 comments on commit 13dec6f

Please sign in to comment.