Help with listening for LocalChatSpyEvents #3782
-
Hello there, I'm trying to work on a plugin that utilizes the I tried registering an event handler like I would do for any other event but it's sadly not triggering. public class SomeListener implements Listener {
@EventHandler
public void onChatSpy(LocalChatSpyEvent event) {
System.out.println(event.getEventName());
}
}
// in onEnable
getServer().getPluginManager().registerEvents(new SomeListener(), this); Is there anything special I need to consider? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I was just able to successfully listen to and interact with this event. Your code looks fine, but there's two things you need to make sure you're doing:
Keep in mind that this event is only for local chat messages and won't fire in certain situations like shouting ( |
Beta Was this translation helpful? Give feedback.
I was just able to successfully listen to and interact with this event. Your code looks fine, but there's two things you need to make sure you're doing:
LocalChatSpyEvent
.chat.radius
in the chat section of the config to something greater than 0.Keep in mind that this event is only for local chat messages and won't fire in certain situations like shouting (
!message
) or questions (?message
).