ItemStack different from Material

Discussion in 'Spigot Plugin Development' started by John_H_Smith, Jul 14, 2019.

Thread Status:
Not open for further replies.
  1. Hi guys,
    I've got a strange error:
    after printing the whole ItemStack, it says for example I
    Code (Text):
    ItemStack{STRIPPED_OAK_LOG x 1}
    If I am using
    Code (Text):
    with exact the same ItemStack, it says AIR.
    How can that be?

    Here is the full code:
    Code (Text):
    public void onInventoryClick(InventoryClickEvent event) {
        Player player = (Player) event.getWhoClicked();    

        ItemStack item = event.getCursor();
  2. Show full code pls
  3. I just edited the post.
  4. Try with item.getType().name()?

    Also, what version do you use?
  5. Its just the same.
    Version is latest stable (1.13.2)
  6. Everything looks fine here:
    Probably non updated code?
  7. @MrMaurice211 no, its the right one. Just try with spilled blocks for example.
    #7 John_H_Smith, Jul 14, 2019
    Last edited: Jul 14, 2019
  8. You need to set the "api-version" on your plugin yml to get all 1.13 materials
  9. You're right! Thank you very much!
Thread Status:
Not open for further replies.