Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-99748

scoreboard teams join and leave not showing error message for missing player argument in command blocks

XMLWordPrintable

    • Confirmed

      The bug

      Commands like /kill or /gamemode 1 will print an error message in command blocks saying that a player needs to be specified. However, this is not the case for /scoreboard teams join team and /scoreboard teams leave

      How to reproduce

      1. Add a team
        /scoreboard teams add testTeam
        
      2. Place a command block and enter the following command
        /scoreboard teams join testTeam
        
      3. Power the command block

      Instead of the error message "You must specify ..." it will print the syntax help.

      The reason

      The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

      The reason why this happens is because the method net.minecraft.command.server.CommandScoreboard.execute(MinecraftServer, ICommandSender, String[]) tests if the sender is a player which it should not do. Instead the method net.minecraft.command.CommandBase.getCommandSenderAsPlayer(ICommandSender) should be called which would then throw the exception.

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: