I'm making a plugin on ScoreBoard and I'm trying to make a space between the text, but it doesn't wo

Discussion in 'Plugin Development' started by Flaksfqa, May 1, 2021.

Thread Status:
Not open for further replies.
  1. Offline

    Flaksfqa

    I'm making a plugin on ScoreBoard and I'm trying to make a space between the text, but it doesn't work for me

    And I connect with the config


    Does not rob an empty string

    PHP:
    Main plugin = (Main)Main.getPlugin(Main.class);
            
    String l1 plugin.cfg.getString("Sb.Lines.Line1");
            
    String l2 plugin.cfg.getString("Sb.Lines.Line2");
            
    String l3 plugin.cfg.getString("Sb.Lines.Line3");
            
    String l4 plugin.cfg.getString("Sb.Lines.Line4");
            
    String l5 plugin.cfg.getString("Sb.Lines.Line5");
            
    String l6 plugin.cfg.getString("Sb.Lines.Line6");
            
    String l8 plugin.cfg.getString("Sb.Lines.Line8");
            
    String l9 plugin.cfg.getString("Sb.Lines.Line9");
            
    String l10 plugin.cfg.getString("Sb.Lines.Line10");
            
    String l11 plugin.cfg.getString("Sb.Lines.Line11");
            
    String l13 plugin.cfg.getString("Sb.Lines.Line13");

            
    Score line1 o.getScore(text(l1));
            
    line1.setScore(12);
            
    Score line2 o.getScore(text(l2));
            
    line2.setScore(11);
            
    Score line3 o.getScore(text(l3));
            
    line3.setScore(10);
            
    Score line4 o.getScore(text(l4));
            
    line4.setScore(9);
            
    Score line5 o.getScore(text(l5));
            
    line5.setScore(8);
            
    Score line6 o.getScore(text(l6));
            
    line6.setScore(7);
            
    o.getScore("").setScore(6);
            
    Score line8 o.getScore(text(l8));
            
    line8.setScore(5);
            
    Score line9 o.getScore(text(l9));
            
    line9.setScore(4);
            
    Score line10 o.getScore(text(l10));
            
    line10.setScore(3);
            
    Score line11 o.getScore(text(l11));
            
    line11.setScore(2);
            
    Score line13 o.getScore(text(l13));
            
    o.getScore("").setScore(1);
            
    line13.setScore(0);

            
    p.setScoreboard(sb);
    Space between text does not work*
     

    Attached Files:

    Last edited by a moderator: May 2, 2021
  2. Offline

    KarimAKL

    @Flaksfqa I am not completely sure, but I think you might need to have something in the string. If you want something that looks invisible, try using a color code.
     
  3. Offline

    Wick

    It's because every scoreboard entry has to be unique, in the context of spaces, "" and "" are the same so if you have a bunch of them like you have only one will apply. To get around this, you can use colour codes with no text, but even easier is to just add extra spaces per line.

    - ""
    - "<one space>"
    - "<two spaces>"
     
  4. Offline

    Xp10d3

    If you can't figure it out, try using FastBoard.
     
Thread Status:
Not open for further replies.

Share This Page