Development Assistance ItemStack declaration changed?

Discussion in 'Plugin Help/Development/Requests' started by TheDiamond06, Jun 1, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    TheDiamond06

    I am using Bukkit 1.8.0 API and I have came across and error.
    When doing:
    Code:java
    1. ItemStack selector= new ItemStack(Material.COMPASS);

    It throws me an error saying the constructor ItemStack(Material) is undefined. Eclipse says a quick fix would be to remove the Material part. This throws no errors, however, how am I supposed to define what material it is?

    What is the new declaration if there is one, or what am I doing wrong. What seems suspicious to me is that when using a 1.7 API this declaration method works fine.
     
  2. Offline

    Gater12

  3. Offline

    CoolGamerXD

    I am pretty sure you imported wrong ItemStack, That's why this is happening to you. You must import "org.bukkit.inventory.ItemStack;". However you have imported "net.minecraft.server.v1_8_R1.ItemStack;"
     
  4. Online

    timtower Administrator Administrator Moderator

    Moved to Bukkit alternatives.
     
Thread Status:
Not open for further replies.

Share This Page