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

This commit is contained in:
Brettflan 2012-09-05 03:42:59 -05:00
parent de9ac6cc1f
commit 56cb2becde

View File

@ -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;