Working on are first plugin need some tips

Discussion in 'Plugin Development' started by kazeen, Nov 17, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    kazeen

    So me and the co-owner of are server have begun the learning process of making plugins
    Study several resources from books on java to videos
    Anyways,
    To the point, we have started making a plugin that is like a mailbox.
    Using a sign to send items to other signs

    So far we have been able to set it up so when they make the sign it automatically applys their name and tells them that they created a mailbox.
    Which was fairly simple for are beginning.
    But getting the signs to actually save and send items seems to be a trickier.

    Any tips on how to go about this would be very much appreciated.
    Keep in mind that this is are first plugin attempt.

    We have a teamspeak if you wanna stop by just drop me a PM and ill give you the details
    or if you wanna see the code we have got so far.
    Dont mind sharing the plugin when it is finished as we have not really discussed who would actually release it yet.
    Thx in advance
     
  2. Offline

    nickrak

    I suggest using the Configuration object to save which mailboxes contain what. That will keep is easy to read and edit if problems occur.

    When a player puts items in the mailbox, take them from the inventory and put them in the Configuration object, and save it. Then when somebody tries to open a mailbox, check the Configuration object to see if that box, or that person, should have any items in it, then either drop those items, or place them in the recipients inventory.
     
  3. Offline

    kazeen

    ok right now when they make the sign it attaches to a chest
    So how exactly do i use the Configuration object to save the players name and location of chest
    So when when they go to send items it looks up the name they put in and sends it to that chest
     
  4. Offline

    nickrak

  5. Offline

    kazeen

    Thanks
    got it working
    Now just gotta setup protection and iconomy stuff
     
Thread Status:
Not open for further replies.

Share This Page