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>
|
<groupId>com.acrobot.chestshop</groupId>
|
||||||
<artifactId>chestshop</artifactId>
|
<artifactId>chestshop</artifactId>
|
||||||
<version>3.7.6</version>
|
<version>3.7.7</version>
|
||||||
<description>Chest-and-sign shop plugin for Bukkit</description>
|
<description>Chest-and-sign shop plugin for Bukkit</description>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
@ -32,6 +32,10 @@
|
|||||||
<id>vault-repo</id>
|
<id>vault-repo</id>
|
||||||
<url>http://ci.herocraftonline.com/plugin/repository/everything</url>
|
<url>http://ci.herocraftonline.com/plugin/repository/everything</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>gravity-repo</id>
|
||||||
|
<url>http://repo.gravitydevelopment.net</url>
|
||||||
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>local_repo</id>
|
<id>local_repo</id>
|
||||||
<url>file://${project.basedir}/repo/</url>
|
<url>file://${project.basedir}/repo/</url>
|
||||||
@ -116,6 +120,11 @@
|
|||||||
<artifactId>residence</artifactId>
|
<artifactId>residence</artifactId>
|
||||||
<version>2.6.6.3</version>
|
<version>2.6.6.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.gravitydevelopment.updater</groupId>
|
||||||
|
<artifactId>updater</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@ -142,6 +151,7 @@
|
|||||||
<artifactSet>
|
<artifactSet>
|
||||||
<includes>
|
<includes>
|
||||||
<include>org.mcstats.bukkit</include>
|
<include>org.mcstats.bukkit</include>
|
||||||
|
<include>net.gravitydevelopment.updater</include>
|
||||||
</includes>
|
</includes>
|
||||||
</artifactSet>
|
</artifactSet>
|
||||||
<relocations>
|
<relocations>
|
||||||
@ -149,6 +159,10 @@
|
|||||||
<pattern>org.mcstats</pattern>
|
<pattern>org.mcstats</pattern>
|
||||||
<shadedPattern>com.Acrobot.ChestShop</shadedPattern>
|
<shadedPattern>com.Acrobot.ChestShop</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>net.gravitydevelopment.updater</pattern>
|
||||||
|
<shadedPattern>com.Acrobot.ChestShop</shadedPattern>
|
||||||
|
</relocation>
|
||||||
</relocations>
|
</relocations>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
@ -38,6 +38,7 @@ import com.Acrobot.ChestShop.Utils.uName;
|
|||||||
import com.avaje.ebean.EbeanServer;
|
import com.avaje.ebean.EbeanServer;
|
||||||
import com.lennardf1989.bukkitex.Database;
|
import com.lennardf1989.bukkitex.Database;
|
||||||
import com.nijikokun.register.payment.forChestShop.Methods;
|
import com.nijikokun.register.payment.forChestShop.Methods;
|
||||||
|
import net.gravitydevelopment.updater.Updater;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
@ -121,6 +122,7 @@ public class ChestShop extends JavaPlugin {
|
|||||||
getCommand("csGive").setExecutor(new Give());
|
getCommand("csGive").setExecutor(new Give());
|
||||||
|
|
||||||
startStatistics();
|
startStatistics();
|
||||||
|
startUpdater();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static File loadFile(String string) {
|
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 ////////////////////////////////
|
///////////////////// DATABASE STUFF ////////////////////////////////
|
||||||
private void setupDB() {
|
private void setupDB() {
|
||||||
loadFile(new File("ebean.properties"));
|
loadFile(new File("ebean.properties"));
|
||||||
|
Loading…
Reference in New Issue
Block a user