Skip to content
Permalink
Browse files

- Bump version number to 0.95.0.7.

  - Add permission plugin information to Towny startup's Using section.
  - Make changelog on updates more readable from the console, hello.
  • Loading branch information...
LlmDl committed Nov 7, 2019
1 parent d3f0d89 commit 5246b660ce7f1b15ed948ceda2c820c53ce71bdb
Showing with 19 additions and 7 deletions.
  1. +1 −1 pom.xml
  2. +4 −1 resources/ChangeLog.txt
  3. +14 −5 src/com/palmergames/bukkit/towny/Towny.java
@@ -7,7 +7,7 @@
<groupId>com.palmergames.bukkit.towny</groupId>
<artifactId>Towny</artifactId>
<packaging>jar</packaging>
<version>0.95.0.6</version>
<version>0.95.0.7</version>

<licenses>
<license>
@@ -3760,4 +3760,7 @@ v0.92.0.11:
0.95.0.6:
- German.yml updated by enterih.
- Fix outlaw not getting removed if hermit, courtesy of benjads.
- Fix loading of mysql databases' townblocks and the new metadata.
- Fix loading of mysql databases' townblocks and the new metadata.
0.95.0.7:
- Add permission plugin information to Towny startup's Using section.
- Make changelog on updates more readable from the console, hello.
@@ -49,6 +49,9 @@
import com.palmergames.bukkit.util.BukkitTools;
import com.palmergames.util.JavaUtil;
import com.palmergames.util.StringMgmt;

import net.milkbowl.vault.permission.Permission;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bukkit.Bukkit;
@@ -59,6 +62,7 @@
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
@@ -301,7 +305,12 @@ private void checkPlugins() {
// Fall back to BukkitPermissions below
} else {
TownyUniverse.getInstance().setPermissionSource(new VaultPermSource(this, chat));
using.add(String.format("%s v%s", "Vault", test.getDescription().getVersion()));
RegisteredServiceProvider<Permission> vaultPermProvider = plugin.getServer().getServicesManager().getRegistration(net.milkbowl.vault.permission.Permission.class);
if (vaultPermProvider != null) {
using.add(vaultPermProvider.getPlugin().getName() + " " + vaultPermProvider.getPlugin().getDescription().getVersion() + " via Vault " + test.getDescription().getVersion());
} else {
using.add(String.format("%s v%s", "Vault", test.getDescription().getVersion()));
}
}
}

@@ -396,19 +405,19 @@ private void update() {
try {
List<String> changeLog = JavaUtil.readTextFromJar("/ChangeLog.txt");
boolean display = false;
LOGGER.info("------------------------------------");
LOGGER.info("[Towny] ChangeLog up until v" + getVersion());
System.out.println("------------------------------------");
System.out.println("[Towny] ChangeLog up until v" + getVersion());
String lastVersion = TownySettings.getLastRunVersion(getVersion()).split("_")[0];
for (String line : changeLog) { // TODO: crawl from the bottom, then
// past from that index.
if (line.startsWith(lastVersion)) {
display = true;
}
if (display && line.replaceAll(" ", "").replaceAll("\t", "").length() > 0) {
LOGGER.info(line);
System.out.println(line);
}
}
LOGGER.info("------------------------------------");
System.out.println("------------------------------------");
} catch (IOException e) {
TownyMessaging.sendDebugMsg("Could not read ChangeLog.txt");
}

0 comments on commit 5246b66

Please sign in to comment.
You can’t perform that action at this time.