funkemunky / AntiVPN

An antivpn utilizing the funkemunky API
Apache License 2.0
19 stars 8 forks source link

Tab completing/typing last 'n' in /antivpn plan throws NPE on Velocity #28

Open AnttiMK opened 1 year ago

AnttiMK commented 1 year ago

After typing the last 'n' character in /antivpn plan or anything after it, a NPE is thrown on Velocity. Tested with Velocity 3.1.2-SNAPSHOT-b200 and KauriVPN 1.8.2.1.

[21:21:01 ERROR]: Node cannot provide suggestions
java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because "suggestions" is null
        at com.velocitypowered.proxy.command.registrar.InvocableCommandRegistrar.lambda$createLiteral$4(InvocableCommandRegistrar.java:107) ~[velocity-3.1.2-SNAPSHOT-200.jar:3.1.2-SNAPSHOT (git-1ec77eb1-b200)]
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
        at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?
funkemunky commented 1 year ago

Working on a fix if this hasn't been fixed already

C0D3-M4513R commented 1 year ago

Duplicate of #34 (or reverse)?