SamB440 / ForcePack

Spigot/Velocity plugin to aid resource pack deployment and enforcement, among other utilities.
https://fortitude.islandearth.net/category/forcepack
GNU General Public License v3.0
53 stars 21 forks source link

reload = error #66

Closed FlameGrowl-wq closed 4 months ago

FlameGrowl-wq commented 6 months ago

I get this error every time i reload the plugin with /vforcepackreload and the screen doesnt show but when i first tried it, it worked

java.lang.NullPointerException: Cannot invoke "com.convallyria.forcepack.velocity.handler.PackHandler.setPack(com.velocitypowered.api.proxy.Player, com.velocitypowered.api.proxy.ServerConnection)" because the return value of "com.convallyria.forcepack.velocity.ForcePackVelocity.getPackHandler()" is null at com.convallyria.forcepack.velocity.command.ForcePackCommand.lambda$onReload$0(ForcePackCommand.java:45) at java.base/java.util.Optional.ifPresent(Optional.java:178) at com.convallyria.forcepack.velocity.command.ForcePackCommand.onReload(ForcePackCommand.java:44) at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733) at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:758) at com.convallyria.forcepack.libs.cloud.annotations.MethodCommandExecutionHandler.executeFuture(MethodCommandExecutionHandler.java:88) at com.convallyria.forcepack.libs.cloud.execution.ExecutionCoordinatorImpl.lambda$coordinateExecution$4(ExecutionCoordinatorImpl.java:121) at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) at com.convallyria.forcepack.libs.cloud.execution.ExecutionCoordinatorImpl$NonSchedulingExecutor.execute(ExecutionCoordinatorImpl.java:53) at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1184) at java.base/java.util.concurrent.CompletableFuture.thenComposeAsync(CompletableFuture.java:2352) at com.convallyria.forcepack.libs.cloud.execution.ExecutionCoordinatorImpl.coordinateExecution(ExecutionCoordinatorImpl.java:104) at com.convallyria.forcepack.libs.cloud.StandardCommandExecutor.executeCommand(StandardCommandExecutor.java:91) at com.convallyria.forcepack.libs.cloud.StandardCommandExecutor.executeCommand(StandardCommandExecutor.java:65) at com.convallyria.forcepack.libs.cloud.brigadier.CloudBrigadierCommand.run(CloudBrigadierCommand.java:65) at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262) at com.velocitypowered.proxy.command.VelocityCommandManager.executeImmediately0(VelocityCommandManager.java:230) at com.velocitypowered.proxy.command.VelocityCommandManager.lambda$executeImmediatelyAsync$1(VelocityCommandManager.java:279) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583)

SamB440 commented 6 months ago

That error doesn't make sense, the real error is likely elsewhere

FlameGrowl-wq commented 6 months ago

but it's on your plug in

SamB440 commented 6 months ago

I meant there should be another error, probably at startup.

The pack handler can't ever be null unless something errored on startup.

FlameGrowl-wq commented 6 months ago

Found it

[18:38:32] [Velocity Async Event Executor - #0/ERROR] [com.velocitypowered.proxy.event.VelocityEventManager]: Couldn't pass ProxyInitializeEvent to forcepack 1.3.4 com.convallyria.forcepack.libs.javalin.util.JavalinBindException: Port already in use. Make sure no other process is using port 8080 and try again. at com.convallyria.forcepack.libs.javalin.jetty.JettyServer.start(JettyServer.kt:101) ~[?:?] at com.convallyria.forcepack.libs.javalin.Javalin.start(Javalin.java:123) ~[?:?] at com.convallyria.forcepack.webserver.ForcePackWebServer.(ForcePackWebServer.java:33) ~[?:?] at com.convallyria.forcepack.velocity.ForcePackVelocity.onProxyInitialization(ForcePackVelocity.java:122) ~[?:?] at com.convallyria.forcepack.velocity.Lmbda$6.execute(Unknown Source) ~[?:?] at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56) ~[velocity-3.3.0-SNAPSHOT-390.jar:3.3.0-SNAPSHOT (git-afd8b55f-b390)] at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[velocity-3.3.0-SNAPSHOT-390.jar:3.3.0-SNAPSHOT (git-afd8b55f-b390)] at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[velocity-3.3.0-SNAPSHOT-390.jar:3.3.0-SNAPSHOT (git-afd8b55f-b390)] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1583) [?:?] Caused by: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8080 at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344) ~[?:?] at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304) ~[?:?] at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402) ~[?:?] at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:?] at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?] at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?] at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024) ~[?:?] at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:?] at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:?] at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?] at org.eclipse.jetty.server.Server.doStart(Server.java:398) ~[?:?] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[?:?] at com.convallyria.forcepack.libs.javalin.jetty.JettyServer.start(JettyServer.kt:93) ~[?:?] ... 10 more Caused by: java.net.BindException: Address already in use at java.base/sun.nio.ch.Net.bind0(Native Method) ~[?:?] at java.base/sun.nio.ch.Net.bind(Net.java:565) ~[?:?] at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:344) ~[?:?] at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:301) ~[?:?] at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339) ~[?:?] at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304) ~[?:?] at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402) ~[?:?] at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:?] at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?] at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?] at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024) ~[?:?] at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:?] at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:?] at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?] at org.eclipse.jetty.server.Server.doStart(Server.java:398) ~[?:?] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[?:?] at com.convallyria.forcepack.libs.javalin.jetty.JettyServer.start(JettyServer.kt:93) ~[?:?] ... 10 more

SamB440 commented 6 months ago

You enabled the web server but you already have a service running on port 8080.