mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-27 12:38:40 +01:00
Add an update checker
This commit is contained in:
parent
9b243e8e7d
commit
9b855a70f3
16
pom.xml
16
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>com.acrobot.chestshop</groupId>
|
||||
<artifactId>chestshop</artifactId>
|
||||
<version>3.7.6</version>
|
||||
<version>3.7.7</version>
|
||||
<description>Chest-and-sign shop plugin for Bukkit</description>
|
||||
|
||||
<scm>
|
||||
@ -32,6 +32,10 @@
|
||||
<id>vault-repo</id>
|
||||
<url>http://ci.herocraftonline.com/plugin/repository/everything</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>gravity-repo</id>
|
||||
<url>http://repo.gravitydevelopment.net</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>local_repo</id>
|
||||
<url>file://${project.basedir}/repo/</url>
|
||||
@ -116,6 +120,11 @@
|
||||
<artifactId>residence</artifactId>
|
||||
<version>2.6.6.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.gravitydevelopment.updater</groupId>
|
||||
<artifactId>updater</artifactId>
|
||||
<version>2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@ -142,6 +151,7 @@
|
||||
<artifactSet>
|
||||
<includes>
|
||||
<include>org.mcstats.bukkit</include>
|
||||
<include>net.gravitydevelopment.updater</include>
|
||||
</includes>
|
||||
</artifactSet>
|
||||
<relocations>
|
||||
@ -149,6 +159,10 @@
|
||||
<pattern>org.mcstats</pattern>
|
||||
<shadedPattern>com.Acrobot.ChestShop</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>net.gravitydevelopment.updater</pattern>
|
||||
<shadedPattern>com.Acrobot.ChestShop</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
@ -38,6 +38,7 @@ import com.Acrobot.ChestShop.Utils.uName;
|
||||
import com.avaje.ebean.EbeanServer;
|
||||
import com.lennardf1989.bukkitex.Database;
|
||||
import com.nijikokun.register.payment.forChestShop.Methods;
|
||||
import net.gravitydevelopment.updater.Updater;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
@ -121,6 +122,7 @@ public class ChestShop extends JavaPlugin {
|
||||
getCommand("csGive").setExecutor(new Give());
|
||||
|
||||
startStatistics();
|
||||
startUpdater();
|
||||
}
|
||||
|
||||
public static File loadFile(String string) {
|
||||
@ -278,6 +280,16 @@ public class ChestShop extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
private static final int PROJECT_BUKKITDEV_ID = 31263;
|
||||
|
||||
private void startUpdater() {
|
||||
if (Properties.TURN_OFF_UPDATES) {
|
||||
return;
|
||||
}
|
||||
|
||||
new Updater(this, PROJECT_BUKKITDEV_ID, this.getFile(), Updater.UpdateType.DEFAULT, true);
|
||||
}
|
||||
|
||||
///////////////////// DATABASE STUFF ////////////////////////////////
|
||||
private void setupDB() {
|
||||
loadFile(new File("ebean.properties"));
|
||||
|
Loading…
Reference in New Issue
Block a user