Inactive [MECH] Backpack v2.2.0 (The Ultimate Inventory Expander!) [953]

Discussion in 'Inactive/Unsupported Plugins' started by Afforess, Feb 25, 2011.

  1. Offline

    Afforess

    Backpack
    Because One is never enough!
    Preface:
    Backpack is the ultimate salvation in inventory management. Your standard minecraft inventory has 36 slots in it, just enough to be handy, but terrible for long journeys or mining expeditions to the other side of the map. Backpack nonatuples your existing inventory space. (For those of you not familiar with latin, that's 9x the space).
    How is this massive inventory boost possible? The mouse wheel. (Thanks to Edward Hand for the idea!) Sneaking while Scrolling through each of the quickslots switches you to a new inventory page. This gives you freedom to scroll through NINE different pages. Scrolling without sneaking allows you to scroll through your inventory like normal.

    If you don't quite get it, I've made a short video demonstrating:
    FAQ:​
    Is there a way to change the number of pages? I only want certain users to have x amount of pages.
    Yes, see the next question down!
    Is there permission or group manager support!
    Nope! There is however a configuration file (aptly named "config.xml") that is created on the first run and allows you to customize the amount of extra inventory pages, and who gets to use them.
    Are your inventories saved between logins and server restarts?
    Yes. Backpack saves the inventories in the same file notch does, in the "player".dat file.
    Updating all those files must be slow/I heard that I/O operations are slow.
    They are. Backpack is multithreaded, so if you have more than 1 core, you won't notice any lag.
    This mod doesn't have anything to do with Minecarts, why the Minecart Mania dependency?
    Minecart Mania offers a useful interface for a lot of things I needed in writing Backpack, and 70% of the code is actually in MM. If you really hate Minecart Mania, you can just install core, and disable all of the features from it's configuration file.
    Dependencies:
    Commands:
    • /open <page number>
      • Opens a dialog with your current inventory, and the inventory from that page so you can easily swap items between pages. Quick slots are numbered 1-10, with 1 on the leftmost side.
    • /backpack
      • Toggles your backpack on or off.
    Permissions:
    (Permissions is optional, but will be used if installed)​
    • backpack.toggle
      • Allows the use of the /backpack command
    • backpack.open
      • Allows the use of the /open command
    • backpack.saveactionbar
      • Saves the action bar in-between pages
    • backpack.maxpages.# (where # is a number 1-9 [e.g backpack.maxpages.6])
      • The maximum pages allowed for the players
    Changelog:
    • Version 0.10
      • Initial Release!
    • Version 0.11
      • Swapped the role of sneaking around
    • Version 0.12
      • Player death is handled correctly
      • When your current inventory page is full, nearby items on the ground will be added to empty slots in other inventory pages.
    • Version 0.13
      • Added a first time login message. Only is triggered once for each player.
    • Version 0.14
      • Added customizable amount of inventory players, through XML.
    • Version 0.15-0.20
      • Bug Fixes
    • Version 0.21
      • Added /open command
    • Version 0.23
      • Reduced I/O operations from being continuous to once per minute
      • Fixed a bug which could cause player inventory pages to be lost if the server shut down in such a way that MM unloaded before the I/O operations finished.
    • Version 1.0
      • Fixed lag caused by I/O operations
      • Player Data now saves correctly, and will not become corrupt during server shutdowns
      • Improved Error Handling
      • Improved Console Log of Information for admins
    • Version 1.0a-1.0g
      • Bug fixes
    • Version 1.1
      • More robust inventory backups
      • /backpack command
    • Version 2.0
      • Supports MC 1.4
      • Action bar no longer switches with new inventory pages
      • Backpack saves with rest of inventory in player.dat file
      • Other plugins can access and correctly see a player's larger inventory w/o being Backpack Aware
    • Version 2.0.1
      • Backpack's work correctly after death
    • Version 2.0.2
      • Small Backpacks work correctly
    • Version 2.0.3
      • Players can choose to save the action bar or have separate action bars via the config
      • Bug fixes
    • Version 2.0.4
      • Improved Error Handling
    • Version 2.0.5
      • Fixed /open command crashing clients
    • Version 2.0.6
      • Fixed item duping on death
    • Version 2.0.7
      • Bug Fixes
    • Version 2.0.8
      • Permissions Support
      • Efficiency Changes
      • Bug Fixes
    • Version 2.0.9
      • Updated to MC 1.5
    • Version 2.1.0
      • Minor fixes/Cleanup
    • Version 2.2.0
      • New saving system
      • Lots of cleanup
      • Lots of bug fixes
     
  2. Offline

    Jessicadawn

    Can you PLEASE make permissions for it =/ We have vips and vips+ and mods and admins that have a different amount of bps and its such a pain to add in everyones name
     
    blaize9 likes this.
  3. Offline

    blaize9

    agreed
     
  4. Offline

    Paah

    Is it possible to mirror the "action bar slots" between inventories?
    When building something high up, I like to sneak to prevent falls to death. Switching between my tools and blocks is extremely annoying because I have to stand up every time, and if the server lags even tad bit, it might still register me as sneaky even though I was standing up clientside, and swap my inventory.
    This way you wouldn't have to switch back to inventory1 everytime you want to use your pickaxe or something.

    I also feel it would make the inventory management easier by action bar being kind of "lobby" where you can drag things, then switch and drag them into the new inventory. More intuitive than using commands.
     
  5. Offline

    Afforess

    That's an interesting idea. Yeah, I like it alot. A bit less space, but much better control. I'll add that in with permission support as soon as I can.
     
  6. Offline

    Virence

    LOL!!! I didn't think of that type of plugin. Thanks mate. This could help my friends and stuffs... BALLS to you my sir
     
  7. Offline

    TatteredKing

    Another damn handy plugin, Afforess. I love not having to stop what I'm doing all the time to go get [whatever] when I'm way out in the hinterlands laying cart tracks. Really useful. Thanks!
     
  8. Offline

    Internal

    Uh, brilliant plugin. The only thing is. Everyone on my server seems to be able to use it. As far as I know you can set it to so only some people have it. I just can't get it to only certain people having it. I'm confused on how to make it only certain people.. :/
     
  9. Offline

    Afforess

    It creates a configuration file. You can manually specify players and how much they can use, as well as a default value for all players not specified in the file.
     
  10. Offline

    sintri

    Had a another backpack take over slot one again, was lagging alot so shutted down the server, seemed whatever backpack slot it was on duplicated over to slot 1 when you start the server again, or when you try to switch over to whatever slot, not entirely sure.
     
  11. Offline

    Internal

    Yeah I understand that. But no matter how I edit it everyone has 9 inventories. :(. Could you post how the config should look with Default having one slot
     
  12. Offline

    Afforess

    Like this?

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <Configuration>
        <Players>
            <Player>
                <!--Users not explicitly added to this list use the default settings-->
                <Name>default</Name>
                <InventoryPages>1</InventoryPages>
            </Player>
            <Player>
                <Name>Afforess</Name>
                <InventoryPages>9</InventoryPages>
            </Player>
    		<Player>
                <Name>Internal</Name>
                <InventoryPages>9</InventoryPages>
            </Player>
    		<Player>
                <Name>SomeoneElse</Name>
                <InventoryPages>9</InventoryPages>
            </Player>
    		<Player>
                <Name>AnotherPlayer</Name>
                <InventoryPages>9</InventoryPages>
            </Player>
        </Players>
    </Configuration>
    
    Just keep adding more <Player> sections as needed. Once you edit the list, save the file, and use the reload command to have the changes take effect.
     
  13. Offline

    Internal

    Yeah, I tried that the first time and it wouldn't seem to work it's all fine now, thanks.
     
  14. Offline

    Stephen92

    can you update to 602 please this didn't work for me.
     
  15. Offline

    Afforess

    Should be working. Post error messages if you get any.
     
  16. Offline

    Aquanoise

    hi!

    i have a question,

    im using craftbukkit right now. if i want the backpack i need minecraft mania core..

    do i have to delete the craftbukkit file and install the minecraft mania core?

    and what about my other plugins?

    im not very good with computer things, so maybe you can help me ;)
     
  17. Offline

    dmower

    on cb #612

    running latest minecartmania

    Code:
    java.lang.NoSuchMethodError: net.minecraft.server.Entity.U()Z
            at com.afforess.backpack.BackpackPlayerListener.onItemHeldChange(BackpackPlayerListener.java:24)
            at org.bukkit.plugin.java.JavaPluginLoader$14.execute(JavaPluginLoader.java:244)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:529)
            at net.minecraft.server.Packet16BlockItemSwitch.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    
     
  18. Offline

    Afforess

    Yes, Backpack DOES NOT work with 1.4.

    I'm working on Backpack 2.0 ATM, that will be superior in every way to 1.1

    Backpack has been updated to 2.0, for MC 1.04!

    This comes with huge changes in how Backpack operates, and 75% of the code has been rewritten.

    NOTE: PREVIOUS BACKPACKS WILL BE ERASED WHEN UPGRADING FROM 1.1 TO 2.0. There is nothing I can do about this. Sorry.

    Backpack's now save when Notch saves the player's inventories. I actually modified his code to allow for larger inventories, and so Backpack's should always save and load correctly. No more missing items.

    Backpack's are also compatible with other inventory modifying mods by default now. Using /i stone 10000 will actually spread the 10000 stone across 3 pages seamlessly, without any special code from other plugins. This is because of the new, and ingenious way backpack operates.


    Technical detials:

    Backpack now creates a custom MC inventory class that extends the existing player inventory class, with 1 minor modification - it stores additional items. This "tricks" the game into thinking a player has 252 slots, when in fact, only 36 are visible. The code is available on Github for your perusal.

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

    wierd

    so, this new method sounds awesome, but I'm wondering what happens to the extra inventory data if you accidentally start up the server without the plugin, will it get wiped?
     
  20. Offline

    Afforess

    If you start the server w/o backpack AND log in AND disconnect, yes that user's backpack will get wiped. Not much I can do about that, since my code changes only take effect while the mod is loaded. The items in the first inventory page will remain just fine though.

    I could always make a backup of player data when the plugin shuts down - if you so desired.
     
  21. Offline

    Badzilla

    Ok, so if I follow this, you are saying that I should put ALL items into a storage chest/chests before an upgrade?
     
  22. Offline

    Afforess

    All items except those in your first page, yes.
     
  23. Offline

    wierd

    Ok, I'm sure a backup would be desirable for some people, but I do a full minecraft folder backup daily, and I make a backup before updating any plugins or bukkit. So I don't personally need it. (I've been burned in the past and have learned my lesson)
    That sounds like the only way around it to me too though. I leave it in your hands to decide whether or not you wish to spend time on it. Don't do so on my account :)

    Edit: Oh yes, with the rewrite. Is there still the minecart mania dependency? Not a problem if there is, just curious
     
  24. Offline

    Badzilla

    I have learned so far that if I save a copy of the data file that I can get items back that were lost.

    Is this still possible with the new version?

    I was never able to duplicate the loss of data so I could tell you anything to help you track it down. I tried. It would just happen so I had to keep shutting down and saving a copy of the data file and when it just was gone, copy a backup to replace it.
     
  25. Offline

    wierd

    from what I gather, backing up the player dat file now should save the inventory (as well as everything else int he player dat) in case there was a problem and you needed to restore it
     
  26. Offline

    sintri

    Well that's a bit unfortunate, just hope everyone logged on the right page, cause I know I didn't.

    Edit: Lost my inventory already, yay!
     
  27. Offline

    Badzilla

    I just tried this with CB612. No errors.
    The only thing is, I put stuff on each of the 9 pages and logged out and did a stop on the server.
    When I started back up and logged in, all of the pages were shifted over by one. IE page 1 was on 2 and page 2 on 3 etc and page 9 was on 1.

    Also, where is this data being stored at now?
     
  28. Offline

    Afforess

    Data is saved in your player.dat file inside your world/players folder.

    I think I know why the player data is shifted over - I'll see if I can't fix that. At least it's harmless.
     
  29. Offline

    Badzilla

    If I found the correct file, it is no longer plain text, it is binary.

    Also, I noticed with the new version that the bottom bar items stay locked. Would it be possible to make this option a configuration option? I set up pages for certain tasks with the tools and items I need for that task. IE a page for constructing tracks, another for creating buildings etc.

    Anyway, thanks for the great plugins.
     
  30. Offline

    Afforess

    @Badzilla

    I know HOW to fix the problem, but the issue is that once a player logs off, I can't touch their inventory anymore. I'm not sure I can ever really fix the moved inventory issue. It's harmless, but annoying.

    Backpack updated to 2.0.1 - now correctly handles user death.
     
  31. Offline

    Badzilla

    Ok, I guess I can live with it.

    Was I correct in that the storage is now binary and not text?
    If so, will backing up this file and if something goes wrong (lost items) put it back and items would then be there again?

    Also would it be possible to have the bottom bar locking a configuration option?
     

Share This Page