v0.972
This commit is contained in:
@@ -46,7 +46,7 @@ import com.nidefawl.Stats.util.Updater;
|
|||||||
|
|
||||||
public class Stats extends JavaPlugin {
|
public class Stats extends JavaPlugin {
|
||||||
public final static Logger log = Logger.getLogger("Minecraft");
|
public final static Logger log = Logger.getLogger("Minecraft");
|
||||||
public final static double version = 0.96D;
|
public final static Double version = 0.972;
|
||||||
public final static String logprefix = "[Stats-" + version + "]";
|
public final static String logprefix = "[Stats-" + version + "]";
|
||||||
public final static String defaultCategory = "stats";
|
public final static String defaultCategory = "stats";
|
||||||
public boolean enabled = false;
|
public boolean enabled = false;
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ public class Updater {
|
|||||||
updated |= (new UpdaterFile(UPDATE_SITE + "lib/sqlite.jar",plugPath+"lib/sqlite.jar",getCurrentSQLiteVersion(),SQLiteVersion)).update(true);
|
updated |= (new UpdaterFile(UPDATE_SITE + "lib/sqlite.jar",plugPath+"lib/sqlite.jar",getCurrentSQLiteVersion(),SQLiteVersion)).update(true);
|
||||||
config.put("sqlite", String.valueOf(SQLiteVersion));
|
config.put("sqlite", String.valueOf(SQLiteVersion));
|
||||||
if (new File("plugins/Achievements.jar").exists()) {
|
if (new File("plugins/Achievements.jar").exists()) {
|
||||||
updated |= (new UpdaterFile(UPDATE_SITE + "Achievements.jar","plugins/Achievements.jar",Achievements.version,AchievementsVersion)).update(autoUpdate);
|
updated |= (new UpdaterFile(UPDATE_SITE + "Achievements.jar","plugins/Achievements.jar",Achievements.getVersion(),AchievementsVersion)).update(autoUpdate);
|
||||||
}
|
}
|
||||||
updated |= (new UpdaterFile(UPDATE_SITE + "Stats.jar","plugins/Stats.jar",Stats.version,StatsVersion)).update(autoUpdate);
|
updated |= (new UpdaterFile(UPDATE_SITE + "Stats.jar","plugins/Stats.jar",Stats.version,StatsVersion)).update(autoUpdate);
|
||||||
saveInternal();
|
saveInternal();
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ public class UpdaterFile {
|
|||||||
if (remoteVersion > localVersion) {
|
if (remoteVersion > localVersion) {
|
||||||
if (autoUpdate) {
|
if (autoUpdate) {
|
||||||
try {
|
try {
|
||||||
Stats.LogInfo("Newer version found - Downloading file : " + remoteLocation);
|
Stats.LogInfo("Newer version of "+localLocation+" found. local: "+localVersion+" remote: "+remoteVersion);
|
||||||
|
Stats.LogInfo("Downloading file : " + remoteLocation);
|
||||||
URL url = new URL(remoteLocation);
|
URL url = new URL(remoteLocation);
|
||||||
File file = new File(localLocation);
|
File file = new File(localLocation);
|
||||||
file.mkdirs();
|
file.mkdirs();
|
||||||
@@ -104,7 +105,7 @@ public class UpdaterFile {
|
|||||||
saveTo(inputStream, outputStream);
|
saveTo(inputStream, outputStream);
|
||||||
inputStream.close();
|
inputStream.close();
|
||||||
outputStream.close();
|
outputStream.close();
|
||||||
Stats.LogInfo(" + Download complete");
|
Stats.LogInfo("Download complete. File saved to "+file.getAbsolutePath());
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Stats.LogInfo("Download failed: " + e.getMessage());
|
Stats.LogInfo("Download failed: " + e.getMessage());
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: Stats
|
name: Stats
|
||||||
main: com.nidefawl.Stats.Stats
|
main: com.nidefawl.Stats.Stats
|
||||||
version: 0.96
|
version: 0.972
|
||||||
author: nidefawl
|
author: nidefawl
|
||||||
commands:
|
commands:
|
||||||
stats:
|
stats:
|
||||||
|
|||||||
Reference in New Issue
Block a user