Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Commit

Permalink
*Fix: Updater send successfuly download message to command sender, no…
Browse files Browse the repository at this point in the history
…t only to console
  • Loading branch information
Zolli committed Mar 19, 2013
1 parent 3ec0418 commit e367fdd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ commands:

updater:
sucessDownload: 'An update is already downloaded. Please restart, or reload the server to take effect'
sucessDownloadMessage: 'Update downloaded successfuly!'
failedDownload: 'An update is available, but the latest download attemp is failed. Sent notification to plugin developer!'
failedCheck: 'An error has occurred while checking for updates. Sent notification to plugin developer!'
updateAvailable1: 'An update available for this plugin.'
Expand Down
1 change: 1 addition & 0 deletions resources/hu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ commands:

updater:
sucessDownload: 'Egy frissítés már letöltésre került. Indítsd újra, vagy reload-old a szervert a változások érvénybeléptetéséhez'
sucessDownloadMessage: 'A frissítés sikeresen letöltve'
failedDownload: 'Egy frissítés elérhető, bár az utolsó letöltési próbálkozás sikertelen volt. Jelentés elküldve a fejlesztőnek!'
failedCheck: 'Egy hiba lépett fel a frissítések ellenőrzése közben. Jelentés elküldve a fejlesztőnek!'
updateAvailable1: 'Egy frissítés érhető el ehhez a pluginhoz.'
Expand Down
4 changes: 4 additions & 0 deletions src/com/Zolli/EnderCore/Commands/command/updateCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public boolean execute(CommandSender sender, String[] args,String chainedParams)
} else if(args[1].equalsIgnoreCase("download")) {
if(this.plugin.updater.getResult().equals(updateResult.UPDATE_AVAILABLE)) {
this.plugin.updater.downloadUpdate();

if(this.plugin.updater.getResult().equals(updateResult.SUCCESS)) {
sender.sendMessage(this.plugin.local.getLocalizedString("updater.sucessDownloadMessage"));
}
} else {
sender.sendMessage(this.plugin.local.getLocalizedString("updater.noUpdate"));
}
Expand Down

0 comments on commit e367fdd

Please sign in to comment.