From 1751702dc17e30ac5f0bc4300838fce15de75e2c Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 5 Sep 2012 03:43:39 -0500 Subject: [PATCH] re-release of 1.6.9.1: added some (apparently absolutely necessary) idiot-proofing for CB version support due to changed GSON lib package name; we were getting a flood of invalid error reports because of it --- src/com/massivecraft/factions/P.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/com/massivecraft/factions/P.java b/src/com/massivecraft/factions/P.java index a24267a3..4e72c621 100644 --- a/src/com/massivecraft/factions/P.java +++ b/src/com/massivecraft/factions/P.java @@ -37,6 +37,7 @@ import com.massivecraft.factions.util.MyLocationTypeAdapter; import com.massivecraft.factions.zcore.MPlugin; import com.massivecraft.factions.zcore.util.TextUtil; +import java.util.logging.Level; import org.bukkit.craftbukkit.libs.com.google.gson.GsonBuilder; import org.bukkit.craftbukkit.libs.com.google.gson.reflect.TypeToken; @@ -79,6 +80,18 @@ public class P extends MPlugin @Override public void onEnable() { + // bit of (apparently absolutely necessary) idiot-proofing for CB version support due to changed GSON lib package name + try + { + Class.forName("org.bukkit.craftbukkit.libs.com.google.gson.reflect.TypeToken"); + } + catch (ClassNotFoundException ex) + { + this.log(Level.SEVERE, "CraftBukkit 1.3.2-R0.1 (build 2340) or newer required. Your CraftBukkit build is not compatible."); + this.suicide(); + return; + } + if ( ! preEnable()) return; this.loadSuccessful = false;