forked from Upstream/CommandPanels
3.15.4.0 #2
This commit is contained in:
parent
1a42ecfb02
commit
46a7dd13b4
@ -96,6 +96,9 @@ public class CommandPanels extends JavaPlugin{
|
|||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
Bukkit.getLogger().info("[CommandPanels] RockyHawk's CommandPanels v" + this.getDescription().getVersion() + " Plugin Loading...");
|
Bukkit.getLogger().info("[CommandPanels] RockyHawk's CommandPanels v" + this.getDescription().getVersion() + " Plugin Loading...");
|
||||||
|
|
||||||
|
//set version to latest version
|
||||||
|
updater.githubNewUpdate(false);
|
||||||
|
|
||||||
//register config files
|
//register config files
|
||||||
this.panelsf = new File(this.getDataFolder() + File.separator + "panels");
|
this.panelsf = new File(this.getDataFolder() + File.separator + "panels");
|
||||||
this.blockConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder() + File.separator + "blocks.yml"));
|
this.blockConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder() + File.separator + "blocks.yml"));
|
||||||
@ -223,9 +226,6 @@ public class CommandPanels extends JavaPlugin{
|
|||||||
//get tag
|
//get tag
|
||||||
tag = tex.papi(config.getString("config.format.tag") + " ");
|
tag = tex.papi(config.getString("config.format.tag") + " ");
|
||||||
|
|
||||||
//set version to latest version
|
|
||||||
updater.githubNewUpdate(false);
|
|
||||||
|
|
||||||
Bukkit.getLogger().info("[CommandPanels] RockyHawk's CommandPanels v" + this.getDescription().getVersion() + " Plugin Loaded!");
|
Bukkit.getLogger().info("[CommandPanels] RockyHawk's CommandPanels v" + this.getDescription().getVersion() + " Plugin Loaded!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,6 +52,11 @@ public class Updater {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void getLatestVersion(boolean sendMessages){
|
public void getLatestVersion(boolean sendMessages){
|
||||||
|
//check for null
|
||||||
|
if(catchedLatestVersion.equals("null")){
|
||||||
|
catchedLatestVersion = plugin.getDescription().getVersion();
|
||||||
|
}
|
||||||
|
|
||||||
//using an array allows editing while still being final
|
//using an array allows editing while still being final
|
||||||
new BukkitRunnable(){
|
new BukkitRunnable(){
|
||||||
public void run(){
|
public void run(){
|
||||||
@ -76,7 +81,7 @@ public class Updater {
|
|||||||
|
|
||||||
//the pluginFileName can only be obtained from the main class
|
//the pluginFileName can only be obtained from the main class
|
||||||
public void autoUpdatePlugin(String pluginFileName){
|
public void autoUpdatePlugin(String pluginFileName){
|
||||||
String latestVersion = githubNewUpdate(false);
|
String latestVersion = catchedLatestVersion;
|
||||||
String thisVersion = plugin.getDescription().getVersion();
|
String thisVersion = plugin.getDescription().getVersion();
|
||||||
|
|
||||||
if(downloadVersionManually != null) {
|
if(downloadVersionManually != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user