Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
import net.tfminecraft.coreprotect.config.ConfigHandler;
import net.tfminecraft.coreprotect.language.Phrase;
import net.tfminecraft.coreprotect.utility.Chat;
import net.tfminecraft.coreprotect.utility.Color;
import net.tfminecraft.coreprotect.utility.VersionUtils;
import net.tfminecraft.coreprotect.utility.ErrorReporter;

/**
* Service responsible for checking compatibility of Minecraft, Java versions,
* and plugin branch validation.
* Service responsible for checking compatibility of Minecraft and Java versions.
*/
public class VersionCheckService {

Expand Down Expand Up @@ -54,21 +52,6 @@ public static boolean performVersionChecks() {
return false;
}

// Patch version validation
if (VersionUtils.newVersion(ConfigHandler.PATCH_VERSION, VersionUtils.getPluginVersion()) && !VersionUtils.isBranch("dev")) {
Chat.console(Phrase.build(Phrase.VERSION_INCOMPATIBLE, "CoreProtect", "v" + VersionUtils.getPluginVersion()));
Chat.sendConsoleMessage(Color.GREY + "[CoreProtect] " + Phrase.build(Phrase.INVALID_BRANCH_2));
return false;
}

// Branch validation
if (ConfigHandler.EDITION_BRANCH.length() == 0) {
Chat.sendConsoleMessage(Color.RED + "[CoreProtect] " + Phrase.build(Phrase.INVALID_BRANCH_1));
Chat.sendConsoleMessage(Color.GREY + "[CoreProtect] " + Phrase.build(Phrase.INVALID_BRANCH_2));
Chat.sendConsoleMessage(Color.GREY + "[CoreProtect] " + Phrase.build(Phrase.INVALID_BRANCH_3));
return false;
}

// Store Minecraft server version for later use
int major = Integer.parseInt(bukkitVersion[0]);
int minor = Integer.parseInt(bukkitVersion[1]);
Expand Down