@@ -9,12 +9,12 @@ public class Checker {
|
||||
private static String directory = Fillr.directory;
|
||||
|
||||
/**
|
||||
* Checks all the .updatr files in Updatr/ for updates
|
||||
* Checks all the plugins in plugins/ for updates
|
||||
*
|
||||
* @param player
|
||||
* The player to send info to
|
||||
*/
|
||||
public void check(Player player) {
|
||||
void check(Player player) {
|
||||
File folder = new File(directory);
|
||||
File[] files = folder.listFiles(new PluginFilter());
|
||||
if (files.length == 0) {
|
||||
@@ -31,14 +31,14 @@ public class Checker {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for an update for a given .updatr file
|
||||
* Checks for an update for a given plugin
|
||||
*
|
||||
* @param file
|
||||
* The plugin file to check for an update
|
||||
* @param player
|
||||
* The player to send info to
|
||||
*/
|
||||
public void checkForUpdate(File file, Player player) {
|
||||
private void checkForUpdate(File file, Player player) {
|
||||
PluginDescriptionFile pdfFile = Checker.getPDF(file);
|
||||
FillReader reader = needsUpdate(pdfFile);
|
||||
if (reader != null) {
|
||||
@@ -58,7 +58,7 @@ public class Checker {
|
||||
* The .yml file to check
|
||||
* @return The FillReader for the online repo info on the plugin
|
||||
*/
|
||||
public static FillReader needsUpdate(PluginDescriptionFile file) {
|
||||
static FillReader needsUpdate(PluginDescriptionFile file) {
|
||||
FillReader reader = new FillReader(file.getName());
|
||||
String version = file.getVersion();
|
||||
String currVersion = reader.getCurrVersion();
|
||||
@@ -79,7 +79,7 @@ public class Checker {
|
||||
* The plugin (jar) file
|
||||
* @return The PluginDescriptionFile representing the .yml
|
||||
*/
|
||||
public static PluginDescriptionFile getPDF(File file) {
|
||||
static PluginDescriptionFile getPDF(File file) {
|
||||
// TODO supports only jar files for now. how will yml's be stored in
|
||||
// different languages?
|
||||
if (file.getName().endsWith(".jar")) {
|
||||
|
||||
Reference in New Issue
Block a user