/** * ct. * * @param pluginClass * @param backupVersion Version aus dem Backup */ private Plugin(String pluginClass, Version backupVersion) { this.pluginClass = pluginClass; this.backupVersion = backupVersion; this.name = this.pluginClass; this.noBackup = this.backupVersion == null; // Checken, ob das Plugin installiert ist de.willuhn.jameica.plugin.Plugin plugin = Application.getPluginLoader().getPlugin(this.pluginClass); this.notInstalled = plugin == null; if (plugin != null) { // Plugin ist installiert. Versionsnummer checken Manifest mf = plugin.getManifest(); this.name = mf.getName(); this.currentVersion = mf.getVersion(); // Wir maengeln einen Versionskonflikt nur an, wenn die Version aus dem Backup // aktueller als die installierte ist. Sollte das Backup aelter sein, findet // ja ein automatisches Upgrade statt this.versionMissmatch = this.backupVersion != null && (this.backupVersion.compareTo(this.currentVersion) > 0); } }