#Help with Annotations

1 messages · Page 1 of 1 (latest)

rotund axle
#

When I create an EventListener with the @lyric pinetHandler annotation the method is instantly marked as used in IntelliJ. When I create my own annotation IntelliJ don't marks the method as used. Why and how can I reproduce this behaivior?

polar lava
#

have you implements Listener?

rotund axle
#

My question is about how I can IntelliJ say to mark my method as used with my own annotation not how to register an event.

polar lava
#

oh

#

well, sorry can't help

rotund axle
#

ok but thanks for your try 😄

echo fable
#

what do you mean mark your method as used?

#

do you mean ```java
@SuppressWarnings("unused")

rotund axle
#

No

#

This is a method with a EventHandler from spigot. I have not used this method anywhere in my code.

polar lava
#

so delete it?

#

i mean, it's more effectiveness

#

in my point of view

#

or if not

#

just do it comment

#

/* */

rotund axle
#

This is a method with my own annotation and this method is recognised as unused. How can I achieve that this method is recognised as used too?

polar lava
#

well, don't know about custom annotations

zinc turret
rotund axle
#

Thank you 😄

rotund axle
#

But I dont marked the spigot methods as used. How can I mark it so that other users have this marked as used too

safe rapids
#

either that or intellij knows from reading spigots code

rotund axle
#

It does it without the dev plugin applied

safe rapids
#

then its intellij being smart and reading through spigots code and making it as known ¯_(ツ)_/¯

rotund axle
#

But I use the annotation too and invoke the method why is it not smart with my code

safe rapids
#

because its intellij

#

youll just have to ignore it

rotund axle
#

Ok