mirror of
https://github.com/colbster937/originblacklist.git
synced 2026-02-04 11:07:41 +00:00
Compare commits
1 Commits
v2.0.1
...
34226ec549
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34226ec549 |
@@ -289,7 +289,7 @@ public final class OriginBlacklist {
|
|||||||
this.updateAvailable = UpdateChecker.checkForUpdate(PLUGIN_REPO, this.plugin.getPluginVersion(),
|
this.updateAvailable = UpdateChecker.checkForUpdate(PLUGIN_REPO, this.plugin.getPluginVersion(),
|
||||||
this.config.get("update_checker.allow_snapshots").getAsBoolean());
|
this.config.get("update_checker.allow_snapshots").getAsBoolean());
|
||||||
if (this.updateAvailable) {
|
if (this.updateAvailable) {
|
||||||
this.plugin.log(EnumLogLevel.INFO, "Update Available! Download at https://github.com/" + PLUGIN_REPO + ".git");
|
this.plugin.log(EnumLogLevel.INFO, "An update is available! Download it at https://github.com/" + PLUGIN_REPO + ".git");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ public class OriginBlacklistCommand implements ICommand {
|
|||||||
public void usage(CommandContext ctx) {
|
public void usage(CommandContext ctx) {
|
||||||
ctx.reply("<aqua>Commands:</aqua>");
|
ctx.reply("<aqua>Commands:</aqua>");
|
||||||
ctx.reply("<gray> - /originblacklist reload</gray>");
|
ctx.reply("<gray> - /originblacklist reload</gray>");
|
||||||
//ctx.reply("<gray> - /originblacklist add <brand/origin/name/ip> <value></gray>");
|
// ctx.reply("<gray> - /originblacklist add <brand/origin/name/ip> <value></gray>");
|
||||||
//ctx.reply("<gray> - /originblacklist remove <brand/origin/name/ip> <value></gray>");
|
// ctx.reply("<gray> - /originblacklist remove <brand/origin/name/ip> <value></gray>");
|
||||||
ctx.reply("<gray> - /originblacklist list</gray>");
|
ctx.reply("<gray> - /originblacklist list</gray>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import java.net.HttpURLConnection;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
import org.semver4j.Semver;
|
import org.semver4j.Semver;
|
||||||
|
import org.semver4j.Semver.VersionDiff;
|
||||||
|
|
||||||
import de.marhali.json5.Json5;
|
import de.marhali.json5.Json5;
|
||||||
import de.marhali.json5.Json5Array;
|
import de.marhali.json5.Json5Array;
|
||||||
@@ -33,7 +34,7 @@ public class UpdateChecker {
|
|||||||
final Json5Object obj = element.getAsJson5Object();
|
final Json5Object obj = element.getAsJson5Object();
|
||||||
final String tag = obj.get("tag_name").getAsString();
|
final String tag = obj.get("tag_name").getAsString();
|
||||||
final Semver ver = new Semver(tag.substring(1));
|
final Semver ver = new Semver(tag.substring(1));
|
||||||
if (ver.isGreaterThan(currentVersion)) {
|
if (ver.isGreaterThan(currentVersion) && (allowPreRelease || currentVersion.diff(ver) != VersionDiff.BUILD)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user