Solved Material enum doesnt work

joshy

New member
Jun 8, 2024
2
0
1
Hey there,

after a long time, i started developing plugins again today. Embarrassingly i already got defeated by the second class im trying to write:

If i try to import org.bukkit.Material; it doesnt work, bc it doesnt find the Class / Enum...
1717874565468.png
other classes of bukkit, like org.bukkit.inventory.ItemStack; work perfectly fine.
1717874691678.png

I tried finding other issues like this on Stackoverflow, this website and google generally, but didnt find anything.

My information:
IDE: IntelliJ IDEA
Java: 17
Build System: Maven
Paper: 1.20.6-137

Can anyone help me with this problem? Im freaking out...

If you need stuff like my pom.xml or smth, let me know!

Thanks :)
Joshy
 

joshy

New member
Jun 8, 2024
2
0
1
You probably have to update IntelliJ and also use Java 21
Worked perfectly, thank you!

I originally used Java 17, because Gradle complained, that it is not compatible and i didnt get it to work.
Any idea, why thats the case? (I used the latest gradle version...)

In the paper docs Java version 21 and gradle are recommended...

Do you think this was because of the outdated intellij version?