DaniFoldi / ProtoGUI

Create GUIs that perform commands on behalf of the player
https://www.spigotmc.org/resources/bungeegui.92209/
7 stars 2 forks source link

Error when using the "test.yml" #135

Open MinecollYT opened 2 years ago

MinecollYT commented 2 years ago

Hey! It seems like there is an issue with "selfTarget" and "requireOnlineTarget" option. I used the test.yml that can be found here.

"selfTarget" doesn't seem to work, and "requireOnlineTarget" causes the following error:

ING: image (I didn't use test for the name)

CONSOLE:

[16:37:33 WARN]: Error in dispatching command
java.lang.NullPointerException: Cannot invoke "String.replace(java.lang.CharSequence, java.lang.CharSequence)" because "text" is null
        at com.danifoldi.protogui.util.Message.replace(Message.java:113) ~[?:?]
        at com.danifoldi.protogui.util.Message.process(Message.java:171) ~[?:?]
        at com.danifoldi.protogui.util.Message.send(Message.java:157) ~[?:?]
        at com.danifoldi.protogui.util.Message.send(Message.java:152) ~[?:?]
        at com.danifoldi.protogui.main.CommandHandler.dispatch(CommandHandler.java:57) ~[?:?]
        at com.danifoldi.protogui.platform.bungee.CommandWrapper.execute(CommandWrapper.java:49) ~[?:?]
        at net.md_5.bungee.api.plugin.PluginManager.dispatchCommand(PluginManager.java:214) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at net.md_5.bungee.api.plugin.PluginManager.dispatchCommand(PluginManager.java:165) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at net.md_5.bungee.connection.UpstreamBridge.handleChat(UpstreamBridge.java:224) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at net.md_5.bungee.connection.UpstreamBridge.handle(UpstreamBridge.java:156) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at net.md_5.bungee.protocol.packet.Chat.handle(Chat.java:78) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at net.md_5.bungee.netty.HandlerBoss.channelRead(HandlerBoss.java:133) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:487) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:385) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[flamecord.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:09023a1:unknown]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
MinecollYT commented 2 years ago

Seems like the targetNotFound: '&cTarget {target} could not be found' is missing by default and the "target" is actually the command. So the args should be at 1 not 0

DaniFoldi commented 2 years ago

Hi :wave:

Thanks for reporting this. I'll take a look within a week or two, until then feel free to open a PR if you've found the root cause.