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

Create key

Discussion in 'Requests' started by Tolo, Apr 23, 2017.

  1. Tolo

    Tolo Silverfish

    Messages:
    15
    GitHub:
    Tolo0
    Anyone know of a working create key plugin?

    Basically a plugin that lets you use a item on a block as a key to receive a random item.
     
  2. jordi1206

    jordi1206 Silverfish

    Messages:
    15
    You can add items to the inventory using the following code.
    I don't really understand the "key" part,

    PHP:
    $item Item::get(itemdamagecount);
    $player->getInventory()->addItem($item);
     
    Tolo likes this.
  3. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    You can try this older one.
    Primus is working on this, but it's not finished.
     
    WinterBuild7074 and Tolo like this.
  4. KingResos

    KingResos Spider Jockey

    Messages:
    37
    GitHub:
    kingresos
    Well I use this one, I would suggest going to DevTools and extract it to a zip file, then find the code for where a feather can be used and changing it to a plain enchanted book.
    Heres a video preview of this plugin :p
     
    Tolo likes this.
  5. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Tolo likes this.
  6. Tolo

    Tolo Silverfish

    Messages:
    15
    GitHub:
    Tolo0
    Thanks guys
     
  7. Tolo

    Tolo Silverfish

    Messages:
    15
    GitHub:
    Tolo0
    Its a really cool plugin but i wish they was a Config.yml to change the items. Changing them in the code is a pain :)
     
  8. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Ive been planning to add that too. I just don't have a computer on hand with a good IDE right now
     
  9. Tolo

    Tolo Silverfish

    Messages:
    15
    GitHub:
    Tolo0
    That would be cool to. i look forward to trying it out once its done. ;)
     
    jasonwynn10 likes this.
  10. KingResos

    KingResos Spider Jockey

    Messages:
    37
    GitHub:
    kingresos
    Just tell me what items u want in it and I'll do it for u :p
     
  11. Tolo

    Tolo Silverfish

    Messages:
    15
    GitHub:
    Tolo0
    Its ok i can do that :) i was trying to modify it so i could add custom named items but not sure exactly how. my php knowledge isn't that great. would this work?

    if(strtolower($name) !== "default"){
    $item->setCustomName($name) . $name .= "God Sword"
     
  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.