Solved Plugin Updater

Discussion in 'Plugin Development' started by ToastHelmi, Mar 31, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    ToastHelmi

    Im Using this Updater: http://forums.bukkit.org/threads/up...ant-auto-updating-for-your-plugins-new.96681/

    But I dont like to download the plugin, i only like to informe players about updates

    this is my code
    Code:java
    1. public class UpdateListener implements Listener{
    2.  
    3. Updater u;
    4. boolean ignoreUpdate = false;
    5.  
    6. public UpdateListener(File f){
    7. u = new Updater(GrandTheftMinecart.getInstance(), 63438, f, UpdateType.NO_DOWNLOAD, false);
    8. }
    9.  
    10. public void toggleInfo(){
    11. ignoreUpdate = !ignoreUpdate;
    12. }
    13. public boolean isInfoEnabeld(){
    14. return !ignoreUpdate;
    15. }
    16. @EventHandler
    17. public void onPlayerJoin(PlayerJoinEvent e){
    18. e.getPlayer().sendMessage(""+(u.getResult() == UpdateResult.UPDATE_AVAILABLE));
    19. if(e.getPlayer().hasPermission("gtm.UpdateInfo") &&
    20. u.getResult() == UpdateResult.UPDATE_AVAILABLE &&
    21. !ignoreUpdate){
    22. e.getPlayer().sendMessage(ChatColor.GOLD +""+ ChatColor.BOLD + "A new Version of Grand Theft Minecart is available!");
    23. e.getPlayer().sendMessage("You can download it here: " + u.getLatestFileLink());
    24. }
    25. }
    26. }


    but it always tells me that ther is an update even if i ste down the version in the plugin.yml
    i also named the files on bukkit right as you can see here
    can you tell me what my mistake is
     
Thread Status:
Not open for further replies.

Share This Page