#my custom events don't get called

1 messages · Page 1 of 1 (latest)

glass coral
#

my custom events don't get called

bold fulcrum
#

Are you sure the code even reaches the call method ?
You have some checks before that.
I would try calling the event from some basic interact event to see if it can be called, if yes then the "calling the event" class has a mistake.

glass coral
#

cause I have a test listener in the original plugin

#

and it works

#

but it doesnt in the second plugin

bold fulcrum
#

try it in this plugin..

glass coral
#

i do listen to PlayerJoinEvent

#

it is called

bold fulcrum
#

I mean, make a PlayerInteractEvent and try to call your custom event there
Then make test listener and print something to see if it gets called

glass coral
# bold fulcrum I mean, make a PlayerInteractEvent and try to call your custom event there Then ...
[14:51:29 INFO]: [DiscordUtils] Account link event!
[14:51:29 INFO]: [DiscordUtils] Interact event!
[14:51:32 INFO]: [DiscordUtils] Account link event!
[14:51:32 INFO]: [DiscordUtils] Interact event!
[14:51:34 INFO]: [DiscordUtils] Account link event!
[14:51:34 INFO]: [DiscordUtils] Interact event!
[14:51:35 INFO]: [DiscordUtils] Account link event!
[14:51:35 INFO]: [DiscordUtils] Interact event!
#

nothing gets called in the second plugin

bold fulcrum
#

now, what do you mean by "second plugin"
are these "connected" in any way?
Are you trying to call one event from one plugin and listen to it in a different plugin ?

glass coral
#

and I want to listen to my custom events from my first plugin in the second plugin

glass coral
#

it is posted in the Maven Central

bold fulcrum
#

ok, I just completely missed that () lol

#

one thing that comes to mind is: do you depend on the first plugin ?
in the plugin.yml or whatever

glass coral
bold fulcrum
#

yep, no idea
sorry I wasn't of help
GL

glass coral
spark kelp
glass coral
spark kelp
#

It can also be that you accidentally unregister listeners, or specific listeners externally

glass coral
spark kelp
glass coral
#

it doesnt work in the plugin that depends on this plugin

spark kelp
#

code?

glass coral
spark kelp
#

of your dependant plugin

#

I assume the links above were from the basic plugin, in which it works?

#

so how does the code look for the plugin in which it doesn't

glass coral
spark kelp
#

and your join event is reached, mhn

#

how did you ensure that your event is called

glass coral
#

nvm the problem is that my maven shaded my plugin into the dependant plugin for some reason ty anyways

spark kelp
#

.-. no worries

plush orchid