1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Sound Not Playing & OBFUSCATED not working

Discussion in 'Plugin Help' started by ShushImSam, Jul 27, 2019.

  1. ShushImSam

    ShushImSam Spider Jockey

    Messages:
    37
    First before telling my problem I just want to thanks y'all because honestly Idk where pmmp would be without these forums. Must be a headache job to help people sometimes, eh? xD


    So well Instead of spamming threads I wanted to merge my two problems, First when I try to play a sound to a player it isnt working
    Code :
    PHP:
        public function onCommand(CommandSender $senderCommand $commandstring $label, array $args): bool
        
    {
            
    $name $sender->getName();
            
    $vector $this->getServer()->getPlayer($name)->getPosition();
            
    $level $this->getServer()->getPlayer($name)->getLevel();
           if (
    $command == "ru" || "rankup") {
                       
    $level->broadcastLevelSoundEvent($vectorLevelSoundEventPacket::SOUND_LEVELUP);
                       return 
    true;
                   }
                   return 
    true;
               }
    My second problem is that when I try to use TextFormat::OBFUSCATED it doesn't work or even the 'k' format code
    PHP:
                       $sender->getServer()->broadcastMessage(TextFormat::GRAY TextFormat::OBFUSCATED "l" TextFormat::RESET TextFormat::YELLOW "$name is " TextFormat::AQUA "cool" TextFormat::YELLOW "!" TextFormat::GRAY TextFormat::OBFUSCATED "l");
    Anyway you guys can help me with that?
     
  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.