remove bukkit reference and use improved API instead