Filled Multiple Inventories for 1 Account

Discussion in 'Plugin Requests' started by Rakinare, Apr 12, 2016.

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



    Plugin category: Miscellaneous

    Suggested name: InventoryProfiles

    What I want: In school we have one PC for the kids with Minecraft installed on it. The Problem is, that we only have one account. I'd like to run a Server where everyone can build their one home etc. but don't have to share the same inventory.
    I'd like a plugin which does change to another inventory on command, so they can all play using the same account. Maybe this can be done by just changing the inventory on command usage or if possible using a "login" to load another inventory (the login can be only the name or if possible name + password).
    It would also be great if the player is getting teleported to the spawn when changing the inventory.

    Ideas for commands:
    /loadprofile [number or name] OR
    /register [name] or /register [name] [password]
    /login [name] or /login [name] [password]

    Ideas for permissions: No extra permissions needed as everyone shall be able to use the command and I won't use any other group or permission plugins.

    When I'd like it by: As soon as possible would be great, as for now I will only be working there for another 4 Months and I'd really like to have it setup by then. (Would be happy if it is possible at all, so doesn't matter if it then takes longer)

    I have seen plugins and plugins in progress that did something pretty similiar but are either completely outdated or were never finished for release. (examples: ToggleInventory)

    Thank you very much for taking your time and reading this!
    Last edited: Apr 12, 2016
  2. Offline


    I would really like to try this the next couple days. But there are some points i have to mention:
    First, i hope you dont need support for other plugins like MultiInv, which could change your inventory. That would be very hard.
    Next, im not sure if i can do the login stuff properly, because i never tried something like password encryption. but i will try my best if this is really needed.
    Rakinare likes this.
  3. Offline



    thanks for your response and great to hear that you wanna try it! :)

    I won't be using any more inventory or permission plugins, so you don't have to take that into account.

    Passwords aren't 100% needed but they would be a great feature.
    They don't have to be encrypted as the kids shall use easy passwords to learn handling that and in case they forget theirs it's a great thing to have the file and look it up.
  4. Offline

    I Al Istannen

    I would also like to try it. If it is ok with you? I will start it now, so if I don't succeed, you can take over ;)

    So you have no permission system at all? The kids can use every command and destroy everything? Should they be de-oped and just you oped (/op)? Would be the easiest solution I can think of.
    Rakinare likes this.
  5. Offline


    @I Al Istannen Also thanks to you for your response.

    I will not have any permission system. They will be normal players like in single player mode, hence no usage of any commands besides the login/inventory changing. Also they can only play one at a time (only one PC that can run Minecraft) and we only have that one account.

    Yes they can in theory destroy and access everything someone else built. That's part of the, well kinda like a project. They should learn to respect each other and the proberty of the others. Also this shall be enhancing their communication with eachother and ask if they can take certain things of others or help out the others themselves.

    Edit: I just got something else into my mind. If you get it to work using a login, can you also try to add that you can not do anything without being logged in? That'd be great! (Kinda like in the LoginSecurity plugin)

    Edit2: If using a permission plugin would make work easier for you in some kind of way feel free to tell me.
    Last edited: Apr 12, 2016
  6. Offline

    I Al Istannen

    Was already the login freeze thing. A Permission plugin would make it harder, so no thanks :D Was just concerned, as on many servers some people go crazy with others' stuff. Good luck with that :)
    It could take a few days, can't exactly tell when I finish. There might be some still unrevealed challenges.
  7. Offline


    @I Al Istannen
    Thank you very much for taking on this.

    They can only play on the server when they are in school (well, after school's out of course), so we will also have an eye on it from time to time.
    But as I mentioned this is to teach them how to respect eachother and their belongings, means in one way we "want" them to try to anger others by stealing/destroying stuff (got quite some kids that will probably try to) and then make them learn from it. It can backfire but I find it an interesting way and if needed I will have to change things up.

    Edit: Is it possible to also add a language file so I can translate messages into my own language? (Stuff like "You need to login first" or "You are now playing as: [name]")
    I am german.
    Last edited: Apr 12, 2016
  8. Offline

    I Al Istannen

    There are just a handful of messages, I won't implement a proper language system. I will make them configurable in the config file though. Also Greetings from Heidelberg :p
  9. Offline


    This idea of Minecraft in schools is nice. Are you a teacher @Rakinare?
  10. Offline


    @I Al Istannen
    That's great, thanks!

    Greetings back from Berlin ^-^

    Edit: @CTRL I am volunteering in the daycare (still not sure if it is called like that in english) where the kids go before and after school and spend their freetime if their parents are working.
    Last edited: Apr 12, 2016
  11. Offline

    I Al Istannen

    Hey, just a quick clarification. Do you want the players to be teleported to the last location they were or just simply to the spawn?
  12. Offline


    @I Al Istannen If it's possible to even make them go to their last location that'd be great too!

    Edit: Or if it's not much more work, making it configurable between those 2 options would be great too, so I can swap if after I see what works best for the kids.

    Edit2: Would using some multiworld plugin be possible together with that one? Don't have to be other inventories in the other world. I am just thinking about making a building (where they can build their city) and a farming world.
    If this would also make the work harder for you, I won't add that.
    Last edited: Apr 12, 2016
    I Al Istannen likes this.
  13. Offline

    I Al Istannen

    I will try my best. Should be entirely possible, the Location also holds the world. ;)
    Rakinare likes this.
  14. Offline


    @I Al Istannen I was allready half through with the plugin until i saw your post here. Thanks a lot for my wasted time.
  15. Offline

    I Al Istannen

    Sorry about that. You said
    thought I had enough time to inform you on that, as I really liked the idea. Also no time wasted, if you insist, I won't publish mine :) I just want that he/she has some plugin.
  16. Offline


    @Lordloss @I Al Istannen

    Why don't you both work together in case someone has a problem with something? :) Or someone got a cleaner solution for some feature than the other one.

    Edit: And it's he :p
  17. Offline


    @I Al Istannen okay it was a bit unlucky expressed by me. I had more time than expected today, so i started it earlier than thought. You can go on, but it would be nice if you wait for a response next time instead of taking it, altough somebody else has told to do so.
    If you need help on some parts just tell me, german translation or something.
    I Al Istannen and Rakinare like this.
  18. Offline

    I Al Istannen

    Totally understandable! I'm sorry, normally not doing this. I was just hopelessly seeking for some things to procrastinate... . And thanks for the offer, but I am from Heidelberg. Some phrases sound better in english, but I hope I am able to create the translation :) Again, I am sorry :/ Thanks for you letting me finish it though!

    Logging in, saving, teleporting is done, Language system mostly (I quite like it, it even changes the command names :p). Still needed is a switch in the config for the teleportation spawn / oldLoc (currently oldLoc) and a few more commands. I didn't implement a login command, but you cant move/interact and can't see the chat unless you followed the instructions in chat and entered your name there. It won't be broadcasted as chat, but you enter it like you threw it out to the world. I am terrible at explaining, you will see :) It will take a bit more work, to polish it a bit, but you can probably expect it by some time tomorrow.
  19. Offline


    @I Al Istannen
    Wow awesome! Didn't expect it to be that fast. Thanks a lot for spending your time and helping out!
  20. Offline

    I Al Istannen

    So, should they keep their gamemode? It uses the one the last loggen in user had. Also just saw the register command. It is finished otherwise, although you would need to create the profiles yourself. Will change the latter now.

    Right now there are these commands. Say if you want some others.
    • Create: Creates a new profile.
      • Usage: /inventoryprofiles create <name> <password> <is operator> <world to spawn at (first time)>
    • Delete: Deletes a profile.
      • Usage: /inventoryprofiles delete <name>
    • Lookup password: Looks up the password for a profile.
      • Usage: /inventoryprofiles lookupPassword <name>
    • Set password: Sets the password for you or the profile specified.
      • Usage: /inventoryprofiles setPassword <password> [name]
    • Ban: Bans a player for the duration specified.
      • Usage: /inventoryprofiles ban <name> <duration>
    • Unban: Unbans a player.
      • Usage: /inventoryprofiles unban <name>
    • Help: Shows the help
      • Usage: /inventoryprofiles help
    • Language Reload: Reloads the language files
      • Usage: /inventoryprofiles langReload
    • Set Language: Sets the current language
      • Usage: /inventoryprofiles langSet <language>
    EDIT: Is the register command needed. Wouldn't quite fit into the system I currently have. Will do it nonetheless if you want it :)
    Last edited: Apr 13, 2016
  21. Offline


    @I Al Istannen
    That looks really great so far!

    Everyone shall be playing on Gamemode 0.
    Well, the Create command is kinda the register command if I see that correctly? So there is no further command needed.
    Can you make the "Lookup password" and "Set password" (at least if used for another profile than the own) OP only? Same for Ban/Unban of course, which I guess you already did.
    How exactly will the <is operator> work? Can only OPs create new profiles as OP or could everyone do so?
    How exactly do I see how a world is called for <world to spawn at>? Is that handled via the multiworld plugin if I chose to use one?
    How do you swap between profiles?
    Can you shorten the /inventoryprofiles to /ip ?
    Can you add <reason> to the ban? Would be great if it would also be shown when that one tries to login :)

    Thanks again for your work! :)

    Edit: This is kinda off-topic but do you know if there's something like MCPC+ back then, for 1.9 now? I'd like to use Biomes'o Plenty for example too. Everything I have looked up is not working on 1.9. (If your plugin would even work on anything else than Bukkit)

    Edit2: Will those logins work from every Minecraft profile or just the one that the inventory profile was created on?
    Last edited: Apr 13, 2016
  22. Offline

    I Al Istannen

    • Create command is like register, but only ops can use it.
    • Only command to be used by non ops is setpassword, and that only works for their own. And help too, of course
    • If the <is operator> is set to true the Player will be automatically opped if he joins the server. That means he has access to all commands, including vanilla ones like /gamemode. For the create, as said before, only op / console
    • The world is just how the folder is called. It will also be the names used in Multiverse or similar. Default is "world", "world_nether" and "world_the_end". This will only set the spawn location for the first time they join. After that they will spawn in the world they left.
    • Swap: Leave, join again and write "<other name> <password>". The data about the player will be saved on leaving
    • Jup, will shorten it. Done
    • No problem, will do that too. Done

    I sadly haven't looked in Modded Minecraftservers, the plugin runs on pretty much everything with a support for Bukkit plugins. I have no idea and haven't checked, but I heard something about Sponge. Might be worth a quick look.

    EDIT: With register the kids could create indefinite many, don't know if that is the desired outcome. Again, I can add it though :)
    Last edited: Apr 13, 2016
    Rakinare likes this.
  23. Offline


    @I Al Istannen

    Thanks for the clarifications.
    Everyone is supposed to have 1 profile, so the create command is totally fine, thank you :)

    Would there be a way to do something like login/logout so you don't have to exit the world or would that be too much work for that less time saving? If it's too hard to add, the current way is totally fine :)

    What I also just got into my mind, is there a way to add playtime? So after they "logged in" to their profile, they've got 20 minutes (configurable) of playtime and then will be automatically logged out with the message that the playtime is over and they can't log back in for 2 hours (configurable).
    Again, if such a feature is too much work, it is not needed, would be a cool thing to have tho, as we can't always have an exact look on how long they are playing already but we have a timing rule.

    Edit: Thanks for the hint with Sponge. This could be the thing I've been looking for! :) (unfortunately not out for 1.9 yet and looks like it's not compatible with bukkit plugins)
    Last edited: Apr 13, 2016
  24. Offline

    I Al Istannen

    • Yes, I can implement a logout command. It shouldn't be a great deal.
    • Playtime: yes, absolutly. Just wonder about AFK time, but you gotta be strict :D Will try to implement it too, should be totally possible and quite easy.
    Will do that in the evening, class test tomorrow and an assignment about BOGY to write ;)

    Have a nice day until then :)
  25. Offline


    @I Al Istannen

    That's awesome! :) Don't know how to thank you for all of your work. That really helps me so much!

    Also good luck for your test and wish you a nice day too!

    Edit: Just noticed that one of my questions wasn't answered yet. Will those logins work from every Minecraft account or just the one that the inventory profile was created on?

    Edit2: There will probably also be no way to get this working with an economy plugin, right? (sign shops mainly)
    Last edited: Apr 13, 2016
  26. Offline

    I Al Istannen

    • They should work from every minecraft account. I will try it soon and edit the post.
      EDIT: Took some time ;) Yes, it works. Problem arise if two players login with the same account at the same time. But that shouldn't be a problem. Minecraft would kick you in such a case. Here it shouldn't happen. I can implement a handling for that though, if you want.
    • Depends on what you mean. Every player his own account? I can try to do it. You will need Vault though, as that is the only way to hook into all of the big economy plugins in one go. Makes it really easier for me.
    • Logout implemented, logging in and out is now logged in the console.
    • Playtime seems to be a bit more complicated, as it also actively kicks the player, but I am 100% sure I can get this to work, but that might take some time. So no release today :/
    Will post and update tomorrow evening (school until 16, sport and another class test) or maybe today if I find time to do some more things this evening.
    Last edited: Apr 13, 2016
  27. Offline


    @I Al Istannen

    Correct. Every player using an own bank account. I will install all plugins that make work easier for you. If it's too hard to do at all, then we can also just let that go. I don't wanna make you too much work, as you did sooo much already.
    If you decide to try it, tell me which plugins you installed to make it work and we are good to go :)

    Same goes for playtime. If it's too complicated we can let that go too. If you wanna try it, take all the time you need. You don't have to rush things :)
    I don't want you to spend your whole day on that plugin hehe :p

    Edit: Just seen Vault isn't released for 1.9 yet but it seems the latest version does still work. Testing out right now which plugin would be the best to also have player/sign shops.

    Edit2: So far I am using Vault and BConomy. Both seem to work fine on 1.9 using their latest versions. Couldn't find a good and up to date sign shop plugin yet. I dislike the ones that I could find so far.
    Last edited: Apr 13, 2016
  28. Offline


    @I Al Istannen you dont have to create a new economy account for every player, just store the amount of money together with the profiles in the config, and on login set the money with vault.

    ChestShops should do the job, it works pretty well on our server and we are on 1.9. But our GUI shop is much prefered ;-)
    Last edited by a moderator: Apr 14, 2016
  29. Offline

    I Al Istannen

    Was going to do that. I just wanted vault to set the money, as you said. But thanks for the tip :)

    Just a quick status:
    Added commands:
    • Add Playtime: Gives the user additional playtime
      • Usage: /inventoryprofiles addPlaytime <additional time>
    • Logout: Logs you out
      • Usage: /inventoryprofiles logout
    Implemented playtime. Config options:
    # The playtime
    playtime: 2m
    # The minutes of playtime left that a warning should appear in chat.
    playtime warn at times in minutes:
      - 0
      - 1
      - 2
      - 5
      - 15
    # The time the playtime will reset after
    playtime reset delay: 1h
    1. Money for every player
    Last edited: Apr 14, 2016
    Rakinare likes this.
  30. Offline


    Sorry guys, haven't been home the whole day.

    @Lordloss I will have a look at that. Have tried it once but it didn't work. Gonna try it out again.
    The problem is that I need it as simple as possible and all the GUI ones aren't that simple to understand and also I can't translate the GUIs into german, meaning it's gonna be hard for the kids to learn and understand.

    What I'd love is when you just put a sign onto a chest with amount and buy and/or sell price, right click with the item you wanna sell and done. Haven't found one that is that simple yet tho.

    @I Al Istannen You are amazing! :)

    I guess /inventoryprofiles and /ip both works as you have written the long version in the explanation again? Just wondering :p

    Logging out will keep you in the game or disconnect you? If it keeps you in the game, how does the login work? Will your introduction just start over again?

    Edit: Chestshop seems to work now. I don't know what the problem was before. Probably gonna use it, thanks :) (Gonna see if the kids understand it, as the sign shows item names in english, would love visualization of them :( )
    Last edited: Apr 14, 2016
Thread Status:
Not open for further replies.

Share This Page