Use -source 8 or higher to enable static interface method invocations

So Im trying to create a plugin that allows a user to type in command /firework and then a firework shoots off by them. But I cant even get it to compile.

I use this in my FireworkCommand class:
FireworkEffect effect = FireworkEffect.builder()
.colors(Color.BLACK, Color.RED, Color.GRAY)
.fades(Color.YELLOW, Color.WHITE, Color.LIME)
.shape(FireworkShapes.STAR)
.trail(true)
.flicker(true)
.build();

but I get this error:
FireworkCommand.java:[47,55] static interface method invocations are not supported in -source 1.5
[ERROR] (use -source 8 or higher to enable static interface method invocations)

So far ive tried changing the java builder and the red x is gone and builder isnt underlined when I switch to 1.8 but I still get this error

You should be compiling against Java 8.

Capture 8 isnt an option for me in this menu, its 1.5-1.8 then 9 and 10. Am I suppose to change it elsewhere. I was literallly looking everywhere until 8am and then had to crash. I havent used eclipse in some time, is it possible something isnt installed correctly?

Ive been setting it everywhere to 1.8, doesnt seem to make a difference. Ive changed my library and made sure it was using jdk1.8.0_171. ive right clicked project gone to properties/javacompiler and set the compiler level to 1.8, I apply it, I run it and nothing same error message each time.

Can you show us your build.gradle file?

Im not using gradle, Ive been using Maven, the pom.xml looks like this:

Capture

Well, I’ve forgotten most of what I know about Eclipse, so I don’t know how else you’d set it. Although if Eclipse says it’s fine but the error comes up anyway, maybe you have to set it explicitly in Maven.

Yeah that could be it though I cant find anything under the maven configuration which is whats killing me, maybe ill go check gradle out. Hopefully I can get that to work. I dont remember exactly but I think I had an issue with gradle before but Ill give it a go again. Its been a while Im a little rusty myself.

Thanks again pie, switching to gradle fixed my issue and I was able to build my plugin. Now I just need to find out why the firework that gets launched when I run the command doesnt have any effects once it gets into the sky. Thanks for the help though, it was much appreciated

Well, if you post your code for actually putting the effect on the firework entity, I can probably help you with that too

Thank you, I actually managed to get it after, i was a misunderstanding on my part, I wasnt offering the effects to the firework entity properly. Thank you for the offer though!