Update upstream CB, reduce version cache time
Closes GH-602
This commit is contained in:
parent
ec31ab32af
commit
919cb9d19a
4 changed files with 21 additions and 12 deletions
|
@ -1,11 +1,11 @@
|
|||
From 9159553f5801fda15241c4be67595ea5c22ba4e4 Mon Sep 17 00:00:00 2001
|
||||
From d9b95019ce4ca79338a34067bd0b6ea22ddd245d Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Mon, 29 Feb 2016 17:58:01 -0600
|
||||
Subject: [PATCH] Check Paper versions
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
index 760d58e..0790f3c 100644
|
||||
index 760d58eb..aae605e9 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
@@ -28,6 +28,11 @@ import org.json.simple.JSONObject;
|
||||
|
@ -20,6 +20,15 @@ index 760d58e..0790f3c 100644
|
|||
public class VersionCommand extends BukkitCommand {
|
||||
public VersionCommand(String name) {
|
||||
super(name);
|
||||
@@ -151,7 +156,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
|
||||
private void sendVersion(CommandSender sender) {
|
||||
if (hasVersion) {
|
||||
- if (System.currentTimeMillis() - lastCheck > 21600000) {
|
||||
+ if (System.currentTimeMillis() - lastCheck > 7200000) { // Paper - Lower to 2 hours
|
||||
lastCheck = System.currentTimeMillis();
|
||||
hasVersion = false;
|
||||
} else {
|
||||
@@ -182,24 +187,28 @@ public class VersionCommand extends BukkitCommand {
|
||||
}
|
||||
}
|
||||
|
@ -139,5 +148,5 @@ index 760d58e..0790f3c 100644
|
|||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.9.2.windows.1
|
||||
2.11.1.windows.1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue