Remove version matching, it's pointless now

This commit is contained in:
vemacs 2015-06-03 07:44:18 -06:00
parent 9f4ccf9eaf
commit d63e342f78
2 changed files with 4 additions and 24 deletions

View File

@ -145,22 +145,9 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
final PluginManager pm = getServer().getPluginManager();
for (Plugin plugin : pm.getPlugins()) {
if (plugin.getDescription().getName().startsWith("Essentials") && !plugin.getDescription().getVersion().equals(this.getDescription().getVersion()) && !plugin.getDescription().getName().equals("EssentialsAntiCheat")) {
LOGGER.log(Level.WARNING, tl("versionMismatch", plugin.getDescription().getName()));
getLogger().warning(tl("versionMismatch", plugin.getDescription().getName()));
}
}
final Matcher versionMatch = Pattern.compile("git-Bukkit-(?:(?:[0-9]+)\\.)+[0-9]+-R[\\.0-9]+-(?:[0-9]+-g[0-9a-f]+-)?b([0-9]+)jnks.*").matcher(getServer().getVersion());
if (versionMatch.matches()) {
final int versionNumber = Integer.parseInt(versionMatch.group(1));
if (versionNumber < BUKKIT_VERSION && versionNumber > 100) {
wrongVersion();
this.setEnabled(false);
return;
}
} else {
LOGGER.log(Level.INFO, tl("bukkitFormatChanged"));
LOGGER.log(Level.INFO, getServer().getVersion());
LOGGER.log(Level.INFO, getServer().getBukkitVersion());
}
execTimer.mark("BukkitCheck");
for (Method method : Server.class.getDeclaredMethods()) {
@ -216,9 +203,9 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
execTimer.mark("RegHandler");
final MetricsStarter metricsStarter = new MetricsStarter(this);
if (metricsStarter.getStart() != null && metricsStarter.getStart() == true) {
if (metricsStarter.getStart() != null && metricsStarter.getStart()) {
runTaskLaterAsynchronously(metricsStarter, 1);
} else if (metricsStarter.getStart() != null && metricsStarter.getStart() == false) {
} else if (metricsStarter.getStart() != null) {
final MetricsListener metricsListener = new MetricsListener(this, metricsStarter);
pm.registerEvents(metricsListener, this);
}
@ -476,13 +463,6 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
}
}
public static void wrongVersion() {
LOGGER.log(Level.SEVERE, " * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! *");
LOGGER.log(Level.SEVERE, tl("notRecommendedBukkit"));
LOGGER.log(Level.SEVERE, tl("requiredBukkit", Integer.toString(BUKKIT_VERSION)));
LOGGER.log(Level.SEVERE, " * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! *");
}
@Override
public BukkitScheduler getScheduler() {
return this.getServer().getScheduler();

View File

@ -140,7 +140,7 @@ public class PermissionsHandler implements IPermissionsHandler {
}
} else {
if (!(handler instanceof ConfigPermissionsHandler)) {
ess.getLogger().info("Essentials: Using config file enhanced permissions.");
ess.getLogger().info("Using config file enhanced permissions.");
ess.getLogger().info("Permissions listed in as player-commands will be given to all users.");
handler = new ConfigPermissionsHandler(ess);
}