From 56cb2becdeb8940e4f110f091ed9e79ce4cd50e0 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 5 Sep 2012 03:42:59 -0500 Subject: [PATCH] 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 ae54a1b9..201eea72 100644 --- a/src/com/massivecraft/factions/P.java +++ b/src/com/massivecraft/factions/P.java @@ -3,6 +3,7 @@ package com.massivecraft.factions; import java.lang.reflect.Modifier; import java.util.Arrays; import java.util.HashSet; +import java.util.logging.Level; import java.util.Set; import org.bukkit.block.Block; @@ -84,6 +85,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;