Skip to content

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

@LucFr1746

Description

@LucFr1746

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: confirmedConfirmed bugs in EssentialsX.module: chatIssues or PRs for the EssentialsChat module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions