PaperMC / Waterfall

BungeeCord fork that aims to improve performance and stability.
https://papermc.io
MIT License
743 stars 297 forks source link

Error when executing command, but no further information. #724

Closed Whitescan closed 2 years ago

Whitescan commented 2 years ago

The command's code in question

    @Override
    public void execute(CommandSender sender, String[] args) {

        if (!sender.hasPermission("command.uuid")) {
            sender.sendMessage("No permission");
            return;
        }

        if (args.length == 1) {

            ProxiedPlayer target = ProxyServer.getPlayer(args[0]);

            if (target == null) {
                sender.sendMessage("Target not found");
                return;
            }

            TextComponent message = ("§7UUID: §b" + target.getUniqueId().toString());
            message.setClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, target.getUniqueId().toString()));
            sender.sendMessage(message);
            return;

        }

        sender.sendMessage("Syntax error, try: /uuid <player>"));

    }

Full Stacktrace:

[02:49:13 INFO]: Whitescan executed command: /uuid Whitescan
[02:49:13 WARN]: Error in dispatching command
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[waterfall-1.18-475.jar:git:Waterfall-Bootstrap:1.18-R0.1-SNAPSHOT:21e4c1d:475]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[waterfall-1.18-475.jar:git:Waterfall-Bootstrap:1.18-R0.1-SNAPSHOT:21e4c1d:475]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[waterfall-1.18-475.jar:git:Waterfall-Bootstrap:1.18-R0.1-SNAPSHOT:21e4c1d:475]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) ~[waterfall-1.18-475.jar:git:Waterfall-Bootstrap:1.18-R0.1-SNAPSHOT:21e4c1d:475]

Something seems of about this. Not even sure what the right place to post this is...

Janmm14 commented 2 years ago

Definitely not the full error log. And I am not sure how the code could ever compile without errors.

Whitescan commented 2 years ago

Obviously a Plugin Class is needed where the command above must be registered.

And it is all of the stacktrace. Full Log

Whitescan commented 2 years ago

Update: I found the issue. The plugin is using another Plugin (as seen in the full log) for data. In my bungee.yml I put depend instead of depends which made the plugin load before the class was present. But that above is still a really weird stacktrace. Should there not be a message like a "unkown value in bungee.yml depend" or a NullPointerException since the dependency is missing?

Janmm14 commented 2 years ago

@Whitescan Please consult the log file next time. Many server panels add a rate limit of lines per second they display. Its quite annoying they are unable to adjust the rate limit for java stack traces - those panels are originally created just for minecraft servers.

Usually these panels add log line writing that some output lines were skipped, thats why I did not expect this problem here, but there is no other possibility.

electronicboy commented 2 years ago

bungee doesn't check for unknown values in those files and doing so now would be a change of behavior which I don't feel is justified