Skip to content

Commit

Permalink
Merge pull request Sgt-Tailor#15 from korikisulda/master
Browse files Browse the repository at this point in the history
Wampie==java noob...
  • Loading branch information
svenwiltink committed May 24, 2013
2 parents 9a0772b + da75076 commit e4de857
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/modreq/ModReq.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ public class ModReq extends JavaPlugin {
public File configFile;
private File messages;
private Metrics metrics;
private String currentVersion;
private PluginDescriptionFile pdfFile;
public String latestVersion;
public String DownloadLink;
private TicketHandler ticketHandler;
Expand All @@ -71,10 +69,6 @@ public void onEnable() {
PluginManager pm = this.getServer().getPluginManager();
pm.registerEvents(new ModReqListener(this), this);

pdfFile = this.getDescription();
currentVersion = pdfFile.getVersion();
String name = pdfFile.getName();

if (plugin.getConfig().getBoolean("check-updates", true)) {
startVersionChecker();
} else {
Expand All @@ -83,11 +77,11 @@ public void onEnable() {
startNotify();
startMetrics();

logger.log(Level.INFO, "{0} version {1} is enabled.", new Object[]{name, currentVersion});
logger.log(Level.INFO, "{0} version {1} is enabled.", new Object[]{this.getDescription().getName(), getCurrentVersion()});
}
@Override
public void onDisable() {
logger.log(Level.INFO, "{0} is now disabled ", pdfFile.getName());
logger.log(Level.INFO, "{0} is now disabled ", this.getDescription().getName());
}

private void startMetrics() {
Expand Down Expand Up @@ -133,7 +127,7 @@ public void reload() {

}
public String getCurrentVersion() {
return currentVersion;
return this.getDescription().getVersion();
}
public TicketHandler getTicketHandler() {
return ticketHandler;
Expand Down

0 comments on commit e4de857

Please sign in to comment.