Open svaningelgem opened 2 months ago
I do this: onEnable
:
private void setupPacketEvents() {
var plugin = getServer().getPluginManager().getPlugin("packetevents");
var isEnabled = plugin != null && plugin.isEnabled();
... rest of the init
==> plugin != null
==> isEnabled = false
Add packetevents
as a dependency in your plugin.yml
Already did that:
depend:
- packetevents
FYI: if I relocate PE into my own plugin, it's working fine...
If you dont shade, dont call the packetevents init methods Also make sure that packetevents is part of your plugin.yml dependencies
If you dont shade, dont call the packetevents init methods
I just followed this here: https://packetevents.gitbook.io/docs/creating-your-packetevents-instance
But it doesn't mention shading anywhere? (well, there is a FAQ TODO about it). But looking at the docs, I would say I have to init()
?
I can confirm that everything works fine as long as I don't use init
.
So I'm guessing this "bug" becomes a documentation issue?
Yes. @retrooper this should be added to the docs. The whole "Creating Your PacketEvents Instace" page only applies when shading.
Describe the bug
Software brand
Log Cut down to the only relevant parts
How To Reproduce I don't know exactly how to reproduce, but what I can glance from the logs is that it looks like
packetevents
is still in the process of enabling itself, and my plugin is enabling in parallel. But it's faster (due to being smaller). And so PE hasn't done its full startup routine yet I guess...Maybe there should be a similar event as in ItemsAdder that triggers "onLoad"?