mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fetch latest vesion on command
PS.get().update would return the URL of the latest update at the time the server was started. Not everybody is restarting their servers daily so it might end up in people not noticing an update in a long while
This commit is contained in:
parent
c1bc3dfc29
commit
a5a001130c
@ -1,6 +1,7 @@
|
|||||||
package com.intellectualcrafters.plot.commands;
|
package com.intellectualcrafters.plot.commands;
|
||||||
|
|
||||||
import com.intellectualcrafters.plot.PS;
|
import com.intellectualcrafters.plot.PS;
|
||||||
|
import com.intellectualcrafters.plot.Updater;
|
||||||
import com.intellectualcrafters.plot.config.C;
|
import com.intellectualcrafters.plot.config.C;
|
||||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||||
import com.intellectualcrafters.plot.util.MainUtil;
|
import com.intellectualcrafters.plot.util.MainUtil;
|
||||||
@ -23,7 +24,7 @@ public class Update extends SubCommand {
|
|||||||
public boolean onCommand(PlotPlayer plr, String[] args) {
|
public boolean onCommand(PlotPlayer plr, String[] args) {
|
||||||
URL url;
|
URL url;
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
url = PS.get().update;
|
url = Updater.getUpdate();
|
||||||
} else if (args.length == 1) {
|
} else if (args.length == 1) {
|
||||||
try {
|
try {
|
||||||
url = new URL(args[0]);
|
url = new URL(args[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user