updated code to work with bukkit version of scriptcraft.