mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fix update notification
This commit is contained in:
parent
558df450b5
commit
cbe8fda1df
@ -660,7 +660,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
&& Settings.Enabled_Components.UPDATE_NOTIFICATIONS) {
|
&& Settings.Enabled_Components.UPDATE_NOTIFICATIONS) {
|
||||||
try {
|
try {
|
||||||
HttpsURLConnection connection = (HttpsURLConnection) new URL(
|
HttpsURLConnection connection = (HttpsURLConnection) new URL(
|
||||||
"https://api.spigotmc.org/legacy/update.php?resource=1177").openConnection();
|
"https://api.spigotmc.org/legacy/update.php?resource=77506").openConnection();
|
||||||
connection.setRequestMethod("GET");
|
connection.setRequestMethod("GET");
|
||||||
spigotVersion =
|
spigotVersion =
|
||||||
(new BufferedReader(new InputStreamReader(connection.getInputStream())))
|
(new BufferedReader(new InputStreamReader(connection.getInputStream())))
|
||||||
@ -677,11 +677,11 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
if (!UpdateUtility.internalVersion.equals(UpdateUtility.spigotVersion)) {
|
if (!UpdateUtility.internalVersion.equals(UpdateUtility.spigotVersion)) {
|
||||||
new PlotMessage("-----------------------------------").send(pp);
|
new PlotMessage("-----------------------------------").send(pp);
|
||||||
new PlotMessage(Captions.PREFIX + "There appears to be a PlotSquared update available!")
|
new PlotMessage(Captions.PREFIX + "There appears to be a PlotSquared update available!")
|
||||||
.color("$1").tooltip("https://www.spigotmc.org/resources/1177/updates").send(pp);
|
.color("$1").tooltip("https://www.spigotmc.org/resources/77506/updates").send(pp);
|
||||||
new PlotMessage(Captions.PREFIX + "The latest version is " + spigotVersion).color("$1").tooltip("https://www.spigotmc.org/resources/1177/updates")
|
new PlotMessage(Captions.PREFIX + "The latest version is " + spigotVersion).color("$1").tooltip("https://www.spigotmc.org/resources/77506/updates")
|
||||||
.send(pp);
|
.send(pp);
|
||||||
new PlotMessage(Captions.PREFIX + "https://www.spigotmc.org/resources/1177/updates")
|
new PlotMessage(Captions.PREFIX + "https://www.spigotmc.org/resources/77506/updates")
|
||||||
.color("$1").tooltip("https://www.spigotmc.org/resources/1177/updates").send(pp);
|
.color("$1").tooltip("https://www.spigotmc.org/resources/77506/updates").send(pp);
|
||||||
new PlotMessage("-----------------------------------").send(pp);
|
new PlotMessage("-----------------------------------").send(pp);
|
||||||
}
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user