Filled MyStuff Player Storage

Discussion in 'Plugin Requests' started by PhillyCheezsteak, Feb 27, 2015.

Thread Status:
Not open for further replies.
  1. Plugin category: Mechanics

    Suggested name: MyStuff

    What I want:
    Two different storages that can be be accessed through commands.

    Each storage has their own max storage space/max slots customizable in the config

    Each player has their own storage.

    Item Whitelist on what items can be placed in the storages.

    If a player tries to put an item in their storage that is not on the whitelist, it will go back in their inventory

    Players cannot pick up any items while in their storage

    Also, skim-reading is much easier with paragraphs!

    Ideas for commands:
    /MyStuff 1
    /MyStuff 2
    /MyStuffAdmin (player name) 1 (access a player's storage)
    /MyStuffAdmin (player name) 2

    Ideas for permissions:
    MyStuff.use (use both storages)
    MyStuff.admin (access player's storages)

    When I'd like it by: As soon as you can please

    NOTE: The whitelist is for both storages
  2. Offline


    @PhillyCheezsteak I will try this. Do you use Java 8?
    EDIT: I'm gonna start this on the off chance you do use Java 8. Please respond if you don't, I'm going to facepalm if you complain about 'Unsupported major/minor version 52.0' error.
    Last edited: Feb 28, 2015
  3. Offline

    timtower Administrator Administrator Moderator

    @pie_flavor Loads of servers still use java 7 to run their stuff.
  4. @pie_flavor sorry for the late reply I did not get an alert. Yeah I use Java 8 xD
  5. Offline


    @timtower Which is why I'm asking. And actually the majority of private/portforwarded servers run Java 8, while the majority of hosts use Java 6.

    @PhillyCheezsteak Finally done. MyStuff.jar
    Note: I wasn't able to test the multiplayer features because i have nobody to test it with :( so I don't actually know if the admin command works, but if I did it right, the player doesn't even have to be on the server.
    Also, the last time I worked with fake inventories, a shift-click crashed the server. So I have disabled that. Just ignore it.

    EDIT by Timtower: merged posts
    Last edited by a moderator: Mar 1, 2015
  6. @pie_flavor Thank you for making the plugin :) I have tested it out and there are a few bugs. No mater how many slots you put for the storages, they do not change. Also there is a bug where you can put items in the storage that are not in the whitelist. If you keep clicking the slot with an item that is not in the whitelist, it will eventually stay in the storage.

    Also would it be possible to have less then 9 slots for one of the storages? Because I am thinking of having 3 or 6 slots for the first storage
    Last edited: Mar 1, 2015
  7. Offline


    @PhillyCheezsteak One of those bugs I cannot fix, as if you keep spam-clicking you will eventually lag the server. That's what causes it. Second, no I cannot put less or more slots. There is no physical way to have an inventory not be a multiple of 9 slots in Bukkit. That's actually why I put the config as rows.
    Lastly, the inventory will stay the same size once created. Delete the config, or delete both of your inventories in the config. Meanwhile, I will try to get the inventory to reshape. What would happen to the items if there isn't enough space?
  8. @pie_flavor If a player's storage is full, they have to swap items and make room. With the first storage, is it possible to block the last 3 slots from being used? Because I would like to have 6 slots maximum for the first storage.

    @timtower sorry to pull you into this, but I was wondering if you had a solution for the non whitelisted items still able to go in the storage?
  9. Offline

    timtower Administrator Administrator Moderator

    @PhillyCheezsteak I have no idea how. Not my plugin, nor did I pay close attention to this thread
  10. @timtower xD so this plugin is a storage plugin that has banned items that are not suppose to go in the storage. The problem is that you can still put banned items in the storage if you keep clicking the item in the storage. I was wondering if you had an idea on how to prevent this or a tip for @pie_flavor with it?
  11. Offline

    timtower Administrator Administrator Moderator

    @PhillyCheezsteak Catching the new item when you close it then push it back to the players inventory
  12. @timtower That is a great idea!

    @pie_flavor Building off of Tim's idea, if a blocked item is put in the storage, it would be deleted and the player will be given the same item/item amount back in their inventory. And when you are accessing your storage, you cannot pick up any items from the ground.
  13. Offline


    @PhillyCheezsteak Done. Also added a couple of setCanPickupItems calls because I completely forgot to do that the first time. You also can't drop items in any way while in the inventory, let me know if you want me to change that.
  14. @pie_flavor I have tested it from the same download link above and there are some bugs.

    Even if you change the config and save it, it will not save.

    You still pick up items when you are accessing your storage

    And you still can place items in the storage that are not in the whitelist
  15. Offline


    @PhillyCheezsteak First of all, any edits made while the server is running will be deleted. This has to do with the way I actually load the config. Second, I fixed all those things. Heck, I set the thing with the picking up items in the command. Third, I actually used timtower's idea and caught the items when the inventory was closed. There shouldn't be any potential conflicts, as the player can't pick up or drop anything.
    Maybe the link's broken. Try this one. MyStuff.jar
  16. @pie_flavor I think you were right, the other download link did not work, but this one fixed all of the bugs! Thank you very much! Everything works perfectly! Thank you again :)
  17. Offline


    @PhillyCheezsteak You're welcome. Tag me if you need a plugin and it's not a minigame.
Thread Status:
Not open for further replies.

Share This Page