Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to send player a crafting window.

Comments in 'Plugin Development' started by Muqsit, Sep 9, 2016.

  1. Muqsit
    Offline

    Muqsit Active Member

    Joined:
    Sep 9, 2015
    Posts:
    175
    Minecraft User:
    Muqsit
    Okay, it is ezpz to add a chest (or any 'tile') inventory...
    There's a ready-made function for that: $player->addWindoe($inv);

    But how do you add a crafting window to $player?
    Since crafting table isn't a tile, how would you do it?
    Last edited: Sep 9, 2016
  2. Muqsit
    Offline

    Muqsit Active Member

    Joined:
    Sep 9, 2015
    Posts:
    175
    Minecraft User:
    Muqsit
    There's no need of spawning a crafting table too...
    PHP:
    public function onActivate(Item $itemPlayer $player null){
    if(
    $player instanceof Player){
    $player->craftingType Player::CRAFTING_BIG;
    }
    return 
    true;
    }
    Player::CRAFTING_BIG ?
  3. Muqsit
    Offline

    Muqsit Active Member

    Joined:
    Sep 9, 2015
    Posts:
    175
    Minecraft User:
    Muqsit
    Player.php
    PHP:
    public $craftingType 0//0 = 2x2 crafting, 1 = 3x3 crafting, 2 = stonecutter
    :eek:

Share This Page

Advertisement