[REQ][FORMATTED]ItemStay

Discussion in 'Archived: Plugin Requests' started by C0nsole, Apr 6, 2012.

  1. Offline

    C0nsole

    Plugin category: I dont know... lol...

    Suggested name: ItemStay

    A bit about me: I am the owner of a server called craftertown that is currently running 2 custom plugins and a ton of not custom plugins, and this plugin could help the server.

    What I want: A plugin so that you do /itemstay and then the next item you drop, and only the NEXT item you drop will not be able to be picked up by anyone and it will not vanish... it will just stay dropped.

    Ideas for commands: /itemstay

    Ideas for permissions: itemstay.use

    When I'd like it by: Any time really, it isnt ESSENTIAL to the server...

    Similar plugin requests: I know of one plugin that uses iConomy shops and the items never fade... but i dont want shops

    Devs who might be interested in this: @CoKoC @tobyias (I really dont know, these are some people that have helped me with other plugins)
     
  2. Offline

    C0nsole

    It has been long enough... can someone please help me?
     
  3. Offline

    Codex Arcanum

    Why do you need this? Any reason not to use a chest locking plugin?
     
  4. Offline

    C0nsole

    I would use it for a display in a shop
     
  5. Offline

    nighteyes604

    I'll look into making this later today (~ 8 hours from now) just wanted to post to give you hope that at least someone was taking it :p .

    Edit: Or does this plugin suit your needs? http://dev.bukkit.org/server-mods/scs/
     
  6. Offline

    C0nsole

    Scs does not suit my needs. I don't want the buying and selling, just make it so the next item u drop after. Doing item stay, nobody (not even you) can pick it up, and it will not despawn. The only way to make it despawn is to do /itemstay undo
     
  7. Offline

    Chaositic

    Just so you know, you can do /scs display in scs
    and right click a block and it will not despawn until you type /scs remove and right click it again.
     
  8. Offline

    C0nsole

    I know but this is not what I want because my admins are snoopy and will find out the commands and use it in their shops, I do not want this, I ONLY want it for display. Also, it uses economy, which I don't want it to

    if nighteyes604 could keep working on this, that would be great, as SCS is not what I want.
     
  9. Offline

    nighteyes604

    Yup I'll work on it now.
     
  10. Offline

    C0nsole

    Okay. Thanks.
    Just as a refresher here is all it needs:
    -One command that does the following(maybe /itemstay?)
    • The next thing you drop will not despawn and will not be able to be picked up.
    • Once you make a new item that will not despawn it will say something like item 1 created.
    -you can re-enable picking up and despawning by doing a command (maybe /itemremove 1)
    • once you do itemremove, it will say item 1 removed.
    -permissions
    • itemstay.create
    • itemstay.delete
    Thanks again!
     
  11. Offline

    nighteyes604

    Here's a link to the first version of your request.

    There are three permission nodes : itemstay.create, itemstay.delete, and itemstay.admin.

    Itemstay.create lets players create their own displays, and delete their own displays.
    Itemstay.delete lets players delete any chest shop.
    Itemstay.admin combines both of those.

    The commands (and permissions) are as follows.

    /itemstay - usable by create / admin, the next item the player drops will become an item display.
    /itemstay list - usable by anyone, lists information about all of the shops within 5 blocks
    /itemstay delete [id] - usable by delete / admin, removes the display protection of the display with that id. Ids can be found through /itemstay list.

    The plugin automatically saves data to a .csv every 30 minutes (if a display was created or destroyed), otherwise changes are saved to the file only when the server shuts down.

    Let me know how it works for you, the only bug I've noticed is that when the server first starts it takes ~20-30 seconds after login for the items to be initially placed.
     
  12. Offline

    C0nsole

    nighteyes604
    Cool! Will try out this afternoon.

    Works great! thanks alot!
    Can you/me make it public?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  13. Offline

    nighteyes604

    I updated the jar to include the source for you, glad it works :) .
     
  14. Offline

    C0nsole

    Cool and I will ask once again about making it public?
     
  15. Offline

    nighteyes604

    Oh sorry - yeah feel free! That's why I gave you the source :D
     
  16. Offline

    C0nsole

    Will do this afternoon.
     
  17. Offline

    C0nsole

  18. Offline

    Darq

    nighteyes604 I took a very quick look at the source, and it looks like you're using a repeating task to respawn all the drops every second. Would it not be easier and better on performance to simple cancel the ItemDespawnEvent on those items?
     
  19. Offline

    nighteyes604

    Sorry guys I've been out today, I tried cancelling the ItemDespawnEvent and it said it was deprecated and wouldn't let me import the actual event. All it's doing every second or two is checking to see if the item still exists which isn't too intensive. I'll look into changing it after this weekend if I can get it to work.

    Edit: Just tried it again with the most recent build and it does work, I'll switch over the code after this weekend. Thank you Darq

    Edit again: I may switch over the code - the way the code is does a few other things like put the item back where it should be if it happens to move.. We'll see :D
     
  20. Offline

    C0nsole

Share This Page