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

How to make a Compass Tracker

Discussion in 'Plugin Help' started by WEATHERCRAFTYT1, Sep 29, 2020.

  1. WEATHERCRAFTYT1

    WEATHERCRAFTYT1 Baby Zombie

    Messages:
    121
    Hello I’m new and made a plugin called Manhunt. There is one problem. I need to make a compass and I have no idea how anyone give me an example of a compass or at least an item that tracks an player.
     
  2. THXC

    THXC Spider

    Messages:
    10
    GitHub:
    codsxblastin
    Primus likes this.
  3. WEATHERCRAFTYT1

    WEATHERCRAFTYT1 Baby Zombie

    Messages:
    121
    That plugin crashes the server in use. Perhaps can show you the error and someone fix it or just find a another.
     
  4. WEATHERCRAFTYT1

    WEATHERCRAFTYT1 Baby Zombie

    Messages:
    121
    I tried using the that plugin but with the latest dev and gives me this error idk if anyone can fix this . It says undefined property on line 41 which is in here.
    PHP:
    private function sendEachType(Player $playerstring $message){
            switch(
    strtolower($this->getConfig()->get('sending-message-type'))){
                case 
    'tip':
                    
    $player->sendTip($message);
                break;
                
                case 
    'popup':
                    
    $player->sendPopup($message);
                break;
                
                default:
                    
    $player->sendMessage($message);
                break;
            }
        }
        
        private function 
    setSpawnPositionPacket(Player $playerVector3 $pos) : void{
            
    $pk = new SetSpawnPositionPacket();
            
    $pk->$pos->getFloorX();
            
    $pk->$pos->getFloorY();
            
    $pk->$pos->getFloorZ();
            
    $pk->x2 $pos->getFloorX();
            
    $pk->y2 $pos->getFloorY();
            
    $pk->z2 $pos->getFloorZ();
            
    $pk->dimension DimensionIds::OVERWORLD;
            
    $pk->spawnType SetSpawnPositionPacket::TYPE_WORLD_SPAWN;
            
    $player->dataPacket($pk);
        }
     
  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.