registering a new scoreboard objective with an empty display name throws a NPE

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None
    • Environment:

      Windows 11, Java 21

    • This server is running CraftBukkit version 3871-Spigot-d2eba2c-3f9263b (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT)
    • custom plugin, check attachment
    • Yes

      Registering a new objective on the main scoreboard with an empty string as display name, will generate a NullPointerException, where displayname is set to null through CraftChatMessage.fromStringOrNull returning null on string.isEmpty

       

      erroring code (attachment):
      Bukkit.getScoreboardManager().getMainScoreboard().registerNewObjective("test", Criteria.DUMMY, "");

       
      log: https://mclo.gs/Crf4aoX

            Assignee:
            Unassigned
            Reporter:
            JustRed23
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: