EssentialsX

EssentialsX

2M Downloads

Essentials Chat: Cannot invoke "String.length()" because "input" is null

LucFr1746 opened this issue ยท 1 comments

commented

Type of bug

Error in console

/ess dump all output

https://essentialsx.net/dump.html?bytebin=C6zWzybNSv

Error log (if applicable)

https://gist.github.com/LucFr1746/85be1ea66f623cd6d4075761cce891b3

Bug description

In MMOProfiles have these lines of code:

@EventHandler
    public void onChat(AsyncPlayerChatEvent var1) {
        if (var1.getPlayer().equals(this.playerData.getPlayer())) {
            var1.setCancelled(true);
            Bukkit.getScheduler().runTask(MMOProfiles.plugin, () -> {
                if (var1.getMessage().equalsIgnoreCase("cancel")) {
                    this.cancelHandler.accept(this);
                    this.close();
                } else if (this.inputHandler.test(this, var1.getMessage())) {
                    this.close();
                }

            });
        }

    }

and when a player inputs their profile name, it logs the error in the console, everything worked but it logs?
Also, the chat history doesn't have the input text.
Ex: When I'm in the input mode and type "Test," the MMOProfiles still recognize that I inputted "Test" and that it works perfectly, but the Essentials log errors. And the chat history doesn't have "Test".

Steps to reproduce

  1. Have the plugin
  2. Create a profile with use-profile-names: true in the config.
  3. It logs the error

Expected behaviour

No errors.

Actual behaviour

Errors in the console.

Additional Information

No response

commented

While I investigate this issue, you may download the latest dev build and in that chat section of your config.yml: add paper-chat-events and set it to false, then restart your server

chat:
  # Whether EssentialsX should use Paper's modern chat event system in 1.16.5+.
  # This is required for modern chat features such as hover events and click events.
  # If you're experiencing issues with other plugins that use the chat event system, you can disable this.
  # You must restart your server after changing this setting.
  paper-chat-events: false