public IChatBaseComponent getScoreboardDisplayName() {
   if (this.hasCustomName()) {
     ChatComponentText var2 = new ChatComponentText(this.b);
     var2.getChatModifier().setChatHoverable(this.aQ());
     var2.getChatModifier().setInsertion(this.getUniqueID().toString());
     return var2;
   } else {
     ChatMessage var1 = new ChatMessage(this.getName(), new Object[0]);
     var1.getChatModifier().setChatHoverable(this.aQ());
     var1.getChatModifier().setInsertion(this.getUniqueID().toString());
     return var1;
   }
 }
  protected void b(String var1) {
    boolean var2 = false;
    Matcher var3 = c.matcher(var1);
    int var4 = 0;
    int var5 = 0;

    try {
      int var7;
      for (; var3.find(var5); var5 = var7) {
        int var6 = var3.start();
        var7 = var3.end();
        if (var6 > var5) {
          ChatComponentText var8 =
              new ChatComponentText(String.format(var1.substring(var5, var6), new Object[0]));
          var8.getChatModifier().setChatModifier(this.getChatModifier());
          this.b.add(var8);
        }

        String var14 = var3.group(2);
        String var9 = var1.substring(var6, var7);
        if ("%".equals(var14) && "%%".equals(var9)) {
          ChatComponentText var15 = new ChatComponentText("%");
          var15.getChatModifier().setChatModifier(this.getChatModifier());
          this.b.add(var15);
        } else {
          if (!"s".equals(var14)) {
            throw new class_fc(this, "Unsupported format: \'" + var9 + "\'");
          }

          String var10 = var3.group(1);
          int var11 = var10 != null ? Integer.parseInt(var10) - 1 : var4++;
          if (var11 < this.e.length) {
            this.b.add(this.a(var11));
          }
        }
      }

      if (var5 < var1.length()) {
        ChatComponentText var13 =
            new ChatComponentText(String.format(var1.substring(var5), new Object[0]));
        var13.getChatModifier().setChatModifier(this.getChatModifier());
        this.b.add(var13);
      }

    } catch (IllegalFormatException var12) {
      throw new class_fc(this, var12);
    }
  }