forked from Upstream/CommandPanels
plugin yml update
This commit is contained in:
parent
124e37d56d
commit
6b93dc1f85
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Project exclude paths
|
||||||
|
/out/
|
@ -1,7 +1,7 @@
|
|||||||
|
version: 3.2.0-pre3
|
||||||
name: CommandPanels
|
name: CommandPanels
|
||||||
main: me.rockyhawk.commandPanels.commandpanels
|
main: me.rockyhawk.commandPanels.commandpanels
|
||||||
author: RockyHawk
|
author: RockyHawk
|
||||||
version: 3.2.0-pre3
|
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
description: Fully Custom GUIs. Make your Server Professional.
|
description: Fully Custom GUIs. Make your Server Professional.
|
||||||
softdepend: [PlaceholderAPI, Vault, HeadDatabase, TokenManager, VotingPlugin]
|
softdepend: [PlaceholderAPI, Vault, HeadDatabase, TokenManager, VotingPlugin]
|
||||||
|
@ -6,11 +6,11 @@ import com.google.common.io.ByteStreams;
|
|||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
import com.mojang.authlib.properties.Property;
|
import com.mojang.authlib.properties.Property;
|
||||||
import com.mojang.authlib.properties.PropertyMap;
|
import com.mojang.authlib.properties.PropertyMap;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.*;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.Reader;
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import me.arcaniax.hdb.api.HeadDatabaseAPI;
|
import me.arcaniax.hdb.api.HeadDatabaseAPI;
|
||||||
@ -140,7 +140,8 @@ public class commandpanels extends JavaPlugin {
|
|||||||
Bukkit.getConsoleSender().sendMessage("[CommandPanels]" + ChatColor.RED + " WARNING: Could not find config version! Your config may be missing some information!");
|
Bukkit.getConsoleSender().sendMessage("[CommandPanels]" + ChatColor.RED + " WARNING: Could not find config version! Your config may be missing some information!");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
githubNewUpdate();
|
||||||
|
/*try {
|
||||||
if (this.config.getString("config.update-notifications").trim().equalsIgnoreCase("true")) {
|
if (this.config.getString("config.update-notifications").trim().equalsIgnoreCase("true")) {
|
||||||
if(!this.getDescription().getVersion().contains("-")) {
|
if(!this.getDescription().getVersion().contains("-")) {
|
||||||
Updater check = new Updater(this, 325941, this.getFile(), Updater.UpdateType.NO_DOWNLOAD, true);
|
Updater check = new Updater(this, 325941, this.getFile(), Updater.UpdateType.NO_DOWNLOAD, true);
|
||||||
@ -157,7 +158,7 @@ public class commandpanels extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
} catch (Exception var9) {
|
} catch (Exception var9) {
|
||||||
Bukkit.getConsoleSender().sendMessage("[CommandPanels]" + ChatColor.RED + " Could not check for update online.");
|
Bukkit.getConsoleSender().sendMessage("[CommandPanels]" + ChatColor.RED + " Could not check for update online.");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//load panelFiles
|
//load panelFiles
|
||||||
reloadPanelFiles();
|
reloadPanelFiles();
|
||||||
@ -1554,4 +1555,18 @@ public class commandpanels extends JavaPlugin {
|
|||||||
Reader targetReader = new CharSequenceReader(new String(buffer));
|
Reader targetReader = new CharSequenceReader(new String(buffer));
|
||||||
return targetReader;
|
return targetReader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void githubNewUpdate(){
|
||||||
|
HttpURLConnection connection;
|
||||||
|
String WRITE;
|
||||||
|
String gitVersion;
|
||||||
|
try{
|
||||||
|
connection = (HttpURLConnection) new URL("https://raw.githubusercontent.com/rockyhawk64/CommandPanels/master/resource/plugin.yml").openConnection();
|
||||||
|
connection.connect();
|
||||||
|
gitVersion = new BufferedReader(new InputStreamReader(connection.getInputStream())).readLine().split("\\s")[1];
|
||||||
|
getServer().getConsoleSender().sendMessage(ChatColor.GREEN + gitVersion);
|
||||||
|
}catch(IOException e){
|
||||||
|
debug(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user