Skip to content

Commit

Permalink
fix: improve how we determine if using FAWE from jenkins (#2754)
Browse files Browse the repository at this point in the history
- SNAPSHOT will usually only be removed if it's a release version
 - If others remove SNAPSHOT, then they're probably doing their own stuff, just use this as the "release" check
 - fixes #2744
  • Loading branch information
dordsor21 authored Jun 2, 2024
1 parent 5da6c65 commit 7635eec
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ private static void processResponseBody(InputStream body) {
Document doc = db.parse(body);
faweVersion = doc.getElementsByTagName("lastSuccessfulBuild").item(0).getFirstChild().getTextContent();
FaweVersion faweVersion = Fawe.instance().getVersion();
if (faweVersion.build == 0 && !faweVersion.snapshot) {
if (faweVersion.build == 0 && faweVersion.snapshot) {
LOGGER.warn("You are using a snapshot or a custom version of FAWE. This is not an official build distributed " +
"via https://www.spigotmc.org/resources/13932/");
return;
}
if (faweVersion.build < Integer.parseInt(UpdateNotification.faweVersion)) {
if (faweVersion.snapshot && faweVersion.build < Integer.parseInt(UpdateNotification.faweVersion)) {
hasUpdate = true;
int versionDifference = Integer.parseInt(UpdateNotification.faweVersion) - faweVersion.build;
LOGGER.warn(
Expand Down

0 comments on commit 7635eec

Please sign in to comment.