mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-03-14 15:49:13 +01:00
Catch throwable for spawnerutil, move nasty warning to spawnerutil
This commit is contained in:
parent
bfa93cc189
commit
20a59ddb6e
@ -148,9 +148,6 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
|
||||
throw new Error("Outdated server. This version of Essentials will only work on Bukkit 1.8 or higher.");
|
||||
}
|
||||
}
|
||||
if (serverString.contains(".v1_8_R1.")) {
|
||||
getLogger().warning("Detected Bukkit 1.8.0. Spawners will not work properly until you upgrade to 1.8.3 or higher.");
|
||||
}
|
||||
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")) {
|
||||
|
@ -33,13 +33,14 @@ public class SpawnerUtil {
|
||||
ItemStack is = new ItemStack(Material.MOB_SPAWNER, 1);
|
||||
ItemMeta meta = is.getItemMeta();
|
||||
useMeta = meta instanceof BlockStateMeta;
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
useMeta = false;
|
||||
}
|
||||
if (useMeta) {
|
||||
ess.getLogger().info("Using BlockStateMeta for spawners");
|
||||
} else {
|
||||
ess.getLogger().info("Using legacy item data for spawners");
|
||||
ess.getLogger().warning("Using legacy item data for spawners");
|
||||
ess.getLogger().warning(ChatColor.RED + "UPGRADE TO SPIGOT 1.8.3 OR HIGHER FOR WORKING SPAWNERS");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user