ScoreHud

Discussion in 'Plugin Help' started by WylSmart, Nov 22, 2019.

  1. WylSmart

    WylSmart Spider

    Messages:
    14
  2. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    78
    GitHub:
    twistedasylummc
  3. WylSmart

    WylSmart Spider

    Messages:
    14
    [​IMG]
    after the inscription numbers 1-15 are displayed, they need to be removed

    PHP:
                if(!is_null($lines $this->getScorelines($levelName))){
                    if(empty(
    $lines)){
                        
    $this->getLogger()->error("Please set lines key for $levelName correctly for scoreboards in scorehud.yml.");
                        
    $this->getServer()->getPluginManager()->disablePlugin($this);

                        return;
                    }

                    
    $i 0;

                    foreach(
    $lines as $line){
                        
    $i++;

                        if(
    $i <= 15){
                            
    ScoreFactory::setScoreLine($player$i$this->process($player$line));
                        }
                    }
                }elseif(
    $this->getConfig()->get("use-default-score-lines")){
                    
    $this->displayDefaultScoreboard($player);
                }else{
                    
    ScoreFactory::removeScore($player);
                }
            }else{
                
    $this->displayDefaultScoreboard($player);
            }
        }
    PHP:
        /**
         * @param Player $player
         */
        
    public function displayDefaultScoreboard(Player $player): void{
            
    $dataConfig $this->scoreHudConfig;

            
    $lines $dataConfig->get("score-lines");

            if(empty(
    $lines)){
                
    $this->getLogger()->error("Please set score-lines in scorehud.yml properly.");
                
    $this->getServer()->getPluginManager()->disablePlugin($this);

                return;
            }

            
    $i 0;

            foreach(
    $lines as $line){
                
    $i++;

                if(
    $i <= 15){
                    
    ScoreFactory::setScoreLine($player$i$this->process($player$line));
                }
            }
        }
     
  4. JackMD

    JackMD Silverfish

    Messages:
    22
    GitHub:
    jackmd
    You seriously don't know what your talking about. The numbers are there because of Mojang. So ask them to remove it for you. Anyways there is another way but I'm far too busy to check if it actually works or not.
     
  5. RicardoMilos384

    RicardoMilos384 Silverfish

    Messages:
    20
    GitHub:
    RicardoMilos384
    Use SuperBar
    SuperBar Haven't Red Number
     

    Attached Files:

  6. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    78
    GitHub:
    twistedasylummc
    This has nothing to do with removing the red numbers. There's no way to do it via code but using the resource pack I linked removes them from your screen

    SuperBar does not use a scoreboard, and instead uses a popup. These popups have different behavious than scoreboards and is not displayed exactly on the right of the screen
     
  7. WylSmart

    WylSmart Spider

    Messages:
    14
  8. HimbeersaftLP

    HimbeersaftLP Chicken

    Messages:
    1,840
    GitHub:
    HimbeersaftLP
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.