Manager fails to initialize when no Plugin annotation is present
- Lingua principale
- Java
- Stelle
- 628
- Fork
- 150
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
VelocityCommandManager fails to initialize when the plugin doesn't have a Plugin annotation and instead uses the json file to register it's properties.
```
[16:44:04 ERROR]: Some errors occurred whilst posting event ProxyInitializeEvent.
[16:44:04 ERROR]: #1: java.lang.NullPointerException: null
at net.craftium.iptracker.libs.acf.VelocityCommandManager.(VelocityCommandManager.java:58) ~[?:?]
at net.craftium.iptracker.IPT.onProxyInitialization(IPT.java:58) ~[?:?]
at net.kyori.event.asm.generated.d75874e35f.IPT-onProxyInitialization-ProxyInitializeEvent-17.invoke(Unknown Source) ~[?:?]
at net.kyori.event.method.SimpleMethodSubscriptionAdapter$MethodEventSubscriber.invoke(SimpleMethodSubscriptionAdapter.java:148) ~[velocity.jar:1.1.5]
at net.kyori.event.SimpleEventBus.post(SimpleEventBus.java:107) ~[velocity.jar:1.1.5]
at com.velocitypowered.proxy.plugin.VelocityEventManager.fireEvent(VelocityEventManager.java:154) ~[velocity.jar:1.1.5]
at com.velocitypowered.proxy.plugin.VelocityEventManager.lambda$fire$1(VelocityEventManager.java:136) ~[velocity.jar:1.1.5]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
```
For some reason ACF is directly getting the annotation (which in this case is not present) to get the plugin's ID instead of accessing it from the API.
https://github.com/aikar/commands/blob/f033dd9541eee468cb05a96db0097ea493f9ec5b/velocity/src/main/java/co/aikar/commands/VelocityCommandManager.java#L56-L58
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.