How can i fix this errror?

Discussion in 'Spigot Plugin Development' started by teeter11, Jul 12, 2015.

  1. So i got a red underline on this line of code :


    and it says :

    The method spigot() is undefined for the type ItemStack

    I have the following in references libraries :


    heres my code :

    package me.Teeter11.BearUnbreakingTools;

    import org.bukkit.command.Command;
    import org.bukkit.command.CommandExecutor;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.*;
    import org.bukkit.inventory.ItemStack;

    public class BearUnbreakingTools extends JavaPlugin {

    public void onEnable(){


    public boolean onCommand(CommandSender sender, Command cmd,String label, String[] args){
    if (cmd.getName().equalsIgnoreCase("unbreakable")){
    if (!(sender instanceof Player)) {

    return true;
    Player s = (Player) sender;


    return false;