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

Picture in map

Discussion in 'Development' started by dirouc, Dec 23, 2017.

  1. dirouc

    dirouc Silverfish

    Messages:
    19
    GitHub:
    dirouc
    How to add a picture to the map that the player has in hand?
     
  2. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
  3. dirouc

    dirouc Silverfish

    Messages:
    19
    GitHub:
    dirouc
    I just need to give the player a map with a picture at PlayerJoinEvent().
     
  4. dirouc

    dirouc Silverfish

    Messages:
    19
    GitHub:
    dirouc
    Or is it very difficult?
     
  5. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    Try MapImageEngine api
    PHP:
    /**
    * @param PlayerJoinEvent $event
    */
    public function onJoin(PlayerJoinEvent $event) {
        
    $player $event->getPlayer();
        
    $map = new FilledMap(MapImageEngine::getInstance()->getImageStorage()->getImageHashByName("image-name"), 11);
        
    $player->getInventory()->setItem(0$map);
    }
     
  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.