Make NPCdialog

Discussion in 'Development' started by Chisi, Jun 10, 2021 at 6:28 PM.

  1. Chisi

    Chisi Creeper

    Messages:
    5
  2. Primus

    Primus Zombie Pigman

    Messages:
    648
    You just sent us the source.

    What you might be looking for, is how to use the source, which again is shown in the link you've given us.

    Does this boil down to be a question of how to create plugins in general?
     
    Chisi likes this.
  3. Chisi

    Chisi Creeper

    Messages:
    5
    yup I mean how to make a plugin with this source, and I want to see the finished plugin
     
  4. ErikX

    ErikX Baby Zombie

    Messages:
    134
    GitHub:
    ErikPDev
    You can create a plugin like any other plugin in poggit.
    Read the README.MD on the github page on how to use it.
    EG:
    PHP:
    $form = new DialogForm("This is the dialog text");
     
    $form->addButton(new Button("Hi", function(Player $player) {
        
    $player->sendMessage("Hi!!");
    }));

    $form->setCloseListener(function(Player $player) {
        
    $player->sendMessage("You closed the form!");
    });

    $form->pairWithEntity($entity);
     
    Chisi and minijaham like this.
  5. minijaham

    minijaham Zombie Pigman

    Messages:
    530
    GitHub:
    minijaham
    Literally says it right there bruh

    upload_2021-6-11_9-4-30.png
     
  6. Chisi

    Chisi Creeper

    Messages:
    5
    sorry, I don't really understand the explanation, that's why I want to see the finished one in its entirety
     
  7. Chisi

    Chisi Creeper

    Messages:
    5
    btw, do you use the command to spawn the entity?
     
  8. minijaham

    minijaham Zombie Pigman

    Messages:
    530
    GitHub:
    minijaham
    :facepalm:
    I think you'll need to learn how to make a plugin first!
     
  9. Chisi

    Chisi Creeper

    Messages:
    5
    I already know how to create a plugin, but I'm still confused about whether to use the command to spawn the entity? and what is the code
     
  10. ErikX

    ErikX Baby Zombie

    Messages:
    134
    GitHub:
    ErikPDev
    The code examples are provided in the README.md.
    If you never knew, You have to create your own code. Just like you create your own tea or sandwhich.
     
    minijaham likes this.

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.