Solved Check if Material can get dropped

Discussion in 'Plugin Development' started by KonstantinM, Jun 21, 2020.

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

    KonstantinM

    Hello,
    I am currently developing a plugin with Bukkit.
    I would like the program to drop a random material. To avoid getting an error message, I want to check if I can drop the material.
    I have already tested the "isAir()" method, but it does not work. Does anyone have an idea how to solve this problem?
    Thanks a lot!
     
  2. Offline

    Machine Maker

    I think you want the isItem() method on the Material enum.
     
    KonstantinM and Legendary_zotar like this.
  3. Offline

    KonstantinM

    Thanks a lot, I should have thought of that myself, but I was confused about a difference between blocks and items.
     
Thread Status:
Not open for further replies.

Share This Page