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

Manually Adding Items

Comments in 'Plugin Development' started by elfin8er, Mar 24, 2014.

  1. elfin8er
    Offline

    elfin8er New Member

    Joined:
    Feb 1, 2014
    Posts:
    25
    Minecraft User:
    elfin8er
    For whatever reason, even some simple items aren't added to PocketMine. Take for an example, paper. As far as I know, its only use is to craft bookshelves. In PocketMine, paper is craftable, but when you "interact" with it, the paper disappears. However, the paper can still be crafted into books, which can be crafted into bookshelves. For most servers this is fine, but what if I want to create a plugin that uses paper? If there's no paper item in the code (as far as I know, this is true), then how I can use it?

    I'm assuming a lot, and this may not be the case, but I would think it would be pretty easy to add paper. It doesn't do anything, but I want to be able to use it in my plugins. Is it easy enough for me to add items to PocketMine?

    EDIT: Correction: there is some code for paper. I wasn't aware that crafting was server-side. Apparently since paper is craftable, it's crafting recipe is in the code. I'm also wondering if display names are server-side. Since item renaming is not yet possible in MCPE, I wonder if it's not.
  2. shoghicp
    Offline

    shoghicp Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    433
    Plugins:
    14
    Minecraft User:
    shoghicp
    There is no specific class for the paper item, but you can create an Item class with that ID
  3. elfin8er
    Offline

    elfin8er New Member

    Joined:
    Feb 1, 2014
    Posts:
    25
    Minecraft User:
    elfin8er
    Care to elaborate?

    From just exploring and messing around, I'd assume I'd have to create "Paper.php" in src\material\item\generic and then add it to src\material\Item.php (PAPER => "PaperItem",). I did that, and didn't get any errors in the console, but it didn't seem to do anything.
    Last edited: Mar 24, 2014

Share This Page

Advertisement