[INACTIVE] [MECH/DEV] SpoutBackpack v2.3.6_3 - Give your players a Backpack [1317]

Discussion in 'Inactive/Unsupported Plugins' started by NeatMonster, Aug 10, 2011.

  1. Offline

    NeatMonster

    Please now use BukkitInventoryTools which contains SpoutBackpack.
    This thread is now useless, please don't post any longer on it.
    -----------------------​
    You can find the Bukkit Dev' thread HERE.
    Please use it, this thread will no longer be updated.

    ------------------------​
    SpoutBackpack v2.0.1
    Give your players a Backpack w/ Spout.

    Because pictures / video are always better than thousand words:
    [​IMG]
    [​IMG]
    (Unofficial video by IAMWIN but outdated: v1.9.5)​

    Features:
    • Pressing a key to open your backpack ;
    • Economy widget if you want it ;
    • Not just backpack, workbench too ;
    • Drop on death (configurable) ;
    • Permissions and economy plugins support ;
    • Allow your players to expand their Backpack ;
    • Restictions of upgrades & commands ;
    • Multiworld support with different Backpacks ;
    • Hooks into WorldGuard, MobArena and Jail ;
    • Key and name can be customized ;
    • API for developers ;
    • Backpacks are saved on server ;
    • Works even on reload.
    Requirements:
    • Spout and Spoutcraft - Required to launch and use the plugin.
      Tested with RB #1.0.5.227 of Spout and RB #1.0.5.256 of Spoutcraft.
    • (OPTIONAL) Permissions - Required if you want to customize the size or upgrade.
    • (OPTIONAL) PermissionsBukkit - Required if you want to customize the size or upgrade.
    • (OPTIONAL) PermissionsEx - Required if you want to customize the size or upgrade.
    • (OPTIONAL) GroupManager - Required if you want to customize the size or upgrade.
    • (OPTIONAL) iConomy - Required if you want to upgrade.
    • (OPTIONAL) BOSEconomy - Required if you want to upgrade.
    • (OPTIONAL) Essentials Economy - Required if you want to upgrade.
    • (OPTIONAL) MultiCurrency - Required if you want to upgrade.
    • (OPTIONAL) WorldGuard - Not required but compatible.
    • (OPTIONAL) MobArena - Not required but compatible.
    • (OPTIONAL) Jail - Not required but compatible.
    Configuration:
    Code:
    Widget:
        PositionY: 5
        PositionX: 3
        Enabled?: true
    Permissions:
        UseGroupManager?: false
        UsePermissions?: true
        UsePermissionsBukkit?: false
        UsePermissionsEx?: false
    Backpack:
        Name: Backpack
        Key: B
        Price:
            '45': 40.0
            '36': 30.0
            '18': 10.0
            '54': 50.0
            '27': 20.0
        RegionWhereBackpacksAreDisabled:
        - region1
        - region2
        world:
            Administrators:
                UpgradeSize: 54
                Size: 54
            Players:
                UpgradeSize: 27
                Size: 9
            Guests:
                UpgradeSize: 0
                Size: 0
            InventoriesShare?: true
            Moderators:
                UpgradeSize: 45
                Size: 27
            Joueurs:
                UpgradeSize: 36
                Size: 18
    Workbench:
        Enabled?: true
        Key: W
        NeededInInventory?: false
    Saves:
        Log?: false
        Interval(InMinutes): 5
    
    For PermissionsBukkit and PermissionsEx, you need to add permissions backpack.worldname.groupname. You also need to order your groups in the configuration file (eg. Admins, then Mods, then Players and then Guests). I'm sorry of this but those two plugins doesn't have the methods I need.

    Permissions:
    • backpack.workbench : Allow the player to open a virtual workbench.
    • backpack.nodrop : No drop of the items in the Backpack on death.
    • backpack.clear : Allow the player to clear his own Backpack.
    • backpack.clear.other : Allow the player to clear others inventories.
    • backpack.info.other: Allow the player to show info about others.
    • backpack.upgrade.other: Allow the player to upgrade others' Backpack.
    • backpack.open.other : Open other players' Backpack.
    • backpack.reload : Allow the use of the /backpack reload command.
    • NOTE: If you use OP system, size for not-Op players will be 9 and 54 for OP players.
    Commands:
    • /backpack clear (Player) : Clear your / player's inventory.
    • /backpack info (Player): Show information about your / player's Backpack.
    • /backpack open [Player] : Open player's Backpack.
    • /backpack upgrade [Player]: Upgrade your /player's Backpack.
    • /backpack reload : Reload Backpack's configuration.
    • NOTE: /backpack's alias is /bp.
    Downloads:
    Highly recommended:
    Credits:
    • The portage from BukkitContrib to Spout of this plugin was made by kazimir!
    • All credits go to captainawesome7 for his awesome BCBackpack plugin!
    TO-DO:
    • Permissions support ; DONE IN 1.3
    • Configuration of the key ; DONE IN 1.3
    • Multiple chest sizes ; DONE IN 1.4
    • iConomy integration ; DONE IN 1.6
    • MobArena hook ; DONE IN 1.6.1
    • BOSEconomy support ; DONE IN 1.6.2
    • PermissionsBukkit support ; DONE IN 1.6.3
    • Multiworld support ; DONE IN 1.7
    • Separate inventories ; DONE IN 1.7
    • WorldGuard regions support ; DONE IN 1.7.1
    • GroupManager support ; DONE IN 1.7.2
    • Workbench ; DONE IN 1.8
    • Jail support ; DONE IN 1.8.1
    • Add an option to disable workbench ; DONE IN 1.8.2
    • Restriction on Workbench ; DONE IN 1.8.4
    • Support of Essentials economy ; DONE IN 1.8.5
    • Economy widget ; DONE IN 1.9
    • Command to clear Backpack ; DONE IN 1.9
    • Restrictions on upgrades ; DONE IN 1.9
    • API ; DONE IN 1.9
    • Setting for the widget position ; DONE IN 1.9.2
    • Lookup in others' Backpack ; DONE IN 1.9.2
    • Support for PermissionsEx ; DONE IN 2.0
    • Handle deaths without Spout client ; DONE IN 2.0
    • Upgrade other players' Backpack ; DONE IN 2.0
    • Furnaces.
    Notes:
    • If you put something in your Backpack and close Minecraft by clicking the "X" without closing your backpack, all items you put in since opening your Backpack are lost. That's not a bug - It's a feature to prevent duping.
    API:
    You want to hook into SpoutBackpack? Fine, I have what you need.
    1. Import SpoutBackpack.jar as a library in your project ;
    2. Import me.neatmonster.spoutbackpack.SBHandler ;
    3. In your main class, add this object creation :
      Code:
          public SBHandler spoutBackpackHandler;
    4. Somewhere on your onEnable, add this line :
      Code:
              setupSpoutBackpack();
    5. So, this is the setupSpoutBackpack function :
      Code:
          private void setupSpoutBackpack() {
                                                      if (spoutBackpackHandler != null) {
                                                          return;
                                                      }
                                                      Plugin spoutBackpackPlugin = this.getServer().getPluginManager().getPlugin("SpoutBackpack");
                                                      if (spoutBackpackPlugin == null) {
                                                          return;
                                                      }
                                                      spoutBackpackHandler = new SBHandler();
                                                      return;
                                                      }
    6. To check somewhere in your code if SpoutBackpack is enabled, use :
      Code:
              if (spoutBackpackHandler != null) {
                                            return;
                                     }
    7. And finally to use a method of SpoutBackpack :
      Code:
              spoutBackpackHandler.theMethodYouWant();
      You can find all the methods HERE.
    8. If you need more methods, or if I made a mistake, do not hesitate to contact me.
    Changelog:
    Version 2.0.1
    • PermissionsBukkit & PermissionsEx fix.
    Version 2.0
    • Improved Backpacks' save system ;
    • PermissionsBukkit full support ;
    • PermissionsEx full support ;
    • Bug fix when client doesn't use Spoutcraft ;
    • Upgrade other players' Backpack.
    Other versions (open)
    Version 1.9.5
    Other versions (open)

    • Added methods for the API.
    Version 1.9.4
    • Fixed API.
    Version 1.9.3
    • Removed debug messages.
    Version 1.9.2
    • Setting for the position of the widget ;
    • Command to open other players' Backpack.
    Version 1.9.1
    • New method added to the API.
    Version 1.9
    • Economy widget when you opens your Backpack ;
    • Commands to clear Backpack(s) ;
    • Restrictions on updates ;
    • Creation of an API ;
    • Bug fixes with economy.
    Version 1.8.5
    • Support of Essentials Economy ;
    • Support of MultiCurrency.
    Version 1.8.4
    • Option to only use workbench if you have one in inventory.
    Version 1.8.3
    • No more saves when nobody is online ;
    • Fixed bug on upgrade.
    Version 1.8.2
    • Workbench toggle in the config.
    Version 1.8.1
    • Jail support.
    Version 1.8
    • Now with you can give your players a virtual workbench ;
    • You can close the workbench with the same key ;
    • Now the workbench will not appear when typing in the chat.
    Version 1.7.3
    • GroupManager full support.
    Version 1.7.2
    • GroupManager support ;
    • Permission for drop on death.
    Version 1.7.1
    • You can specify WorldGuard region where Backpacks will be disabled ;
    • More, more, more and more keys.
    Version 1.7
    • New multiworld support ;
    • Separate inventories ;
    • Common inventories ;
    • Reload command ;
    • Smart detection of plugins you've installed ;
    • Some code rewrite = more proper code.
    Version 1.6.3
    • Added PermissionsBukkit support with configuration options.
    Version 1.6.2
    • Support for BOSEconomy, no configuration needed ;
    • More anti-cheat messages and information for users.
    Version 1.6.1
    • Hooks in MobArena : when a player is inside an arena, I can't open his BackPack ;
    • For more security, it checks if iConomy is installed.
    Version 1.6
    • Added iConomy support & /backpack commands, which allow your players to expand their Backpack by paying some iConomy money (configurable in config.yml) ;
    • Minor bug fixes & code cleanup.
    Version 1.5
    • Added support for multiword (see in config.yml).
    • More and more help in the config.yml.
    Version 1.4
    • New permissions for different sizes.
    Version 1.3
    • Closing you backpack will now saves his content.
    • Permissions support.
    • You can now change the key used to open the backpack in the configuration.
    Version 1.2
    • Original version.



    [​IMG]
     
  2. Offline

    Spiritwind

    Yeah, it still dosent seem to work. However the version of spout that was released today is pretty buggy and keeps making my server crash.
     
  3. Offline

    NeatMonster

    Hum, I don't know. When Spout will be more stable on your server, post a message and I'll make a special debug version.
     
  4. Offline

    Spiritwind

    Alright. I thank you very much for working with me on this!
     
  5. Offline

    NeatMonster

    Oh, it's a pleasure.
     
    Spiritwind likes this.
  6. Offline

    Duckdoom5

    @NeatMonster you know what I was wondering? you open the workbench with W but did you forgot that you need to walk with W ? XD still good plugin! tnx!
     
  7. Offline

    NeatMonster

    You're late:
     
  8. Offline

    elitefroggy

    i press b, nothing happens
     
  9. Offline

    Mordaith

    @NeatMonster Works like a charm. Thanks. Question! Anyway to invoke multiple backpacks? Like hit 'B' for one backpack, and open a second one with 'V' or something like that?
     
  10. Offline

    NeatMonster

    Wooh, so much information. Please read the OP, check if you have the requirements and set correctly the perms.

    Edit:
    Why not. I'll add it to my TO-DO list, but first a need to finalize a new version of my second plugin.
     
    Mordaith likes this.
  11. Offline

    fafd

    Hi

    Really like your idea with this plugin. Thx.

    I too have a problem with the key for the backpack. I'v changed it to another key, but stil no-go. The workbench key works just fine, it's just the backpack key which does not work. I do not even get a reply in the consol when typing /bp info, etc.

    Running:
    Craftbukkit version git-Bukkit-0.0.0-980-g4ed23b1-b1060jnks (MC: 1.7.3)

    My Plugins:
    CommandBook 1.5.2
    DynMap 0.21
    InventorySave 0.5
    LagMeter 0.3
    LazyRoad 0.5.2
    MineBackup 0.4.6.1
    MobileAdmin 3.0.1
    Multiverse-Core 2.0-b201
    NaturalGiants 1.3
    PermissionsEx 1.13
    Spout 1.0.2.115
    SpoutBackpack 1.8.1
    Stargate 0.5.5
    SupplySign 1.7.1
    VoxelAir 2.008
    VoxelSniper 4.748c
    WorldEdit 4.6
    WorldGuard 5.2.2

    SpoutClient:
    Running latest rec. build, same as server.

    My SpoutBackpack config:
    Code:
    LogTheSaves?: false
    KeyUsedToOpenTheBackpack: R
    PriceToUpgradeToThe45Backpack: 40.0
    UseGroupManager?: false
    IntervalInMinutesBetweenEachSaving: 5
    NameOfTheBackpack: Rygsack
    WorldsWhoShareInventories:
    - world
    - renverden1
    - slagmark
    - space
    PriceToUpgradeToThe54Backpack: 50.0
    UsePermissionsBukkit?: false
    RegionsWhereBackpacksAreDisabled:
    - region1
    - region2
    PriceToUpgradeToThe27Backpack: 20.0
    PriceToUpgradeToThe18Backpack: 10.0
    UsePermissions?: false
    KeyUsedToOpenTheWorkbench: F
    SeparateInventories?: false
    PriceToUpgradeToThe36Backpack: 30.0
    I do not use permissions right now, only OP.

    Am I missing something? Please when you have time and energy.

    Thank you for your time, and happy holiday.
     
  12. Offline

    elitefroggy

    yes i have met the requirements, everything appears to work, no errors and it doesnt work when i press b.
    permissionsbukkit is setout as shown (spaces wouldnt paste)

    xbot905:
    worlds:
    world:
    backpack.size9: true
    groups:
    - default
    - user
    elitefroggy:
    worlds:
    world:
    backpack.size9: true
    groups:
    - default
    - user
    groups:
    default:
    permissions:
    permissions.build: true
    archers.*: true
    archers.arrow: true
    mcmmo.skills.*: true
    mcmmo.item.*: true
    mcmmo.ability.*: true
    mcmmo.regeneration: true
    runecraft.*: true
    backpack.size9: true
    backpack.upgrade: true
    backpack.reload: true
    admin:
    permissions:
    permissions.*: true
    inheritance:
    - user
    user:
    permissions:
    permissions.build: true
    archers.*: true
    mcmmo.skills.*: true
    mcmmo.item.*: true
    mcmmo.ability.*: true
    mcmmo.regeneration: true
    runecraft.*: true
    backpack.size9: true
    backpack.upgrade: true
    backpack.reload: true
    worlds:
    creative:
    coolplugin.item: true
    inheritance:
    - default
    messages:
    build: '&cYou do not have permission to build here.'

    and, how do you add a spoiler menu (for the future)
     
  13. Offline

    Duckdoom5

    lol, sorry [sheep]

    can you add an option to disable the workbench?
     
  14. Offline

    mrgreaper

    my point is it was not imposible! we have a backpack of 72 squares (despite it set to 75) this was back when the plugin was perfect, no need for multiple permissions etc..... however now we need to update we cant as it would be a downgrade. Please re-add the ability to set specific size for all players with out the need for permissions

    [​IMG]

    Uploaded with ImageShack.us
     
  15. Offline

    NeatMonster

    Wow, nice message!
    Re-download the .JAR (I added debug info) and copy-paste me the results when you try to open your backpack.

    Re-download the .JAR (I added debug info) and copy-paste me the results when you try to open your backpack.
    [*SPOILER][/*SPOILER] (Without the *.)

    Yep, I'll add it to my TO-DO list.

    For the size, let me quote kazimir :
    I'll think about your proposition.
     
  16. Offline

    false_chicken

    I second that. Great plugin though.
     
  17. Offline

    Wiernusz

    Well I supposed it'd be easier to let you define the groups, somewhat like in MultiHome; Rank A B C can upgrade to say, 47, but D can updrade to 56 while ABC cannot.

    Any sense? Thanks for the response.
     
  18. Offline

    NeatMonster

    Okay, I'll make a lite version with no permissions.

    I understand now. So, do you think it's better to define this in the config:
    Code:
    GroupsAbleToUpgradeTo9:
        - Group1
        - Group2
    etc.
    
    or to use permissions:
    Code:
    backpack.upgrade9
    backpack.upgrade18
    etc.
    ?
     
  19. Offline

    fafd

    Thank you for your reply.

    After downloading the "debug" version, it works. I can now open the Backpack with my chosen key !! :D

    This is from the log:
    Code:
    2011-08-16 17:38:48 [INFO] [SpoutBackpack] canOpenBackpack = true
    
    2011-08-16 17:38:49 [INFO] [SpoutBackpack] getWorldGuard() != null
    2011-08-16 17:38:49 [INFO] [SpoutBackpack]true
    Possible to get a non-debug version of that?

    Thx again.
     
  20. Offline

    NeatMonster

    Yes, download the new version.

    Enjoy! :)
     
  21. Offline

    theakore

    Is there a feature to disable inventory backup whilst no one is logged into the server? I couldn't find an option in the config.
     
  22. Offline

    Wiernusz

    I'd go with defining in the config, as I think that'd be a bit easier/avoid problems with group inheritance (for those who use MCMyAdmin).


    Oh, and since you don't seem to mind my feedback. Here is my config:

    Code:
    LogTheSaves?: true
    KeyUsedToOpenTheBackpack: B
    PriceToUpgradeToThe45Backpack: 10000.0
    UseGroupManager?: false
    IntervalInMinutesBetweenEachSaving: 5
    NameOfTheBackpack: Stash
    WorldsWhoShareInventories:
    - world
    - world_nether
    PriceToUpgradeToThe54Backpack: 15000.0
    UsePermissionsBukkit?: false
    RegionsWhereBackpacksAreDisabled:
    - pvp001
    PriceToUpgradeToThe27Backpack: 5000.0
    PriceToUpgradeToThe18Backpack: 1000.0
    UsePermissions?: true
    KeyUsedToOpenTheWorkbench: C
    SeparateInventories?: false
    PriceToUpgradeToThe36Backpack: 7500.0
    
    That is how it was generated. Seems a bit random. Not really a big deal, just some polish if you feel up to it.


    Also, I still havn't been able to test fully with permissionsbukkit based upgrades, due to the fact that Spout 1.0.2 is acting funky, and auto-updates back to 1.0.1 even with the value set to false (This plugin does not work without SpoutPlugin 1.0.2, atleast with b1000). Not an issue on your part though.
     
  23. Offline

    Olat

    @NeatMonster
    If you would have LOOKED at the pastebin.
    I dont GIVE permissions for ANY of my players to upgrade the backpack. They ONLY have
    backpack.size9
    and thats it...

    So them upgrading is NOT allowed. And yet they still could.
     
  24. Offline

    Duckdoom5

    tanx! :D
     
  25. Offline

    mrgreaper

    Kazimir is wrong (sorry but the evidence is right there lol) this is how we have had it for (unsure of the amount of time ...maybe 2 weeks?? a week??)
    no crashes
    no loss of tickrate
    no client freezes
    as you can see from the screenie its the size we use only thing is the background texture looks wierd but it works its functional and we all love it.

    just to prove im not doctoring screenies or well lieing this is a video me and a mate made just having a laugh on our server ....its an hour 13minutes long if you skip through it im sure you will see me using the stasis pod with its 72 spaces and no crashes insue
     
  26. Offline

    Kane

    @NeatMonster trying now. I noticed if I do group1 group2 group3 and 9 18 27 it seams that the highest guy say mod whos after group3 is only getting group 1 backpack size.

    I tried this also but it failed hehe:
    backpack.size9: false
    backpack.size18: false
    backpack.size27: true

    Strange works now. Relogging did not do it. I had to change worlds hehe

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

    NeatMonster

    Hum... Let me check my code...
    *opening Eclipse*
    No. Good suggestion!

    Yes, I know, the position of the lines is really strange, but it's Bukkit integrated configuration system.
    Maybe I'll switch to another configuration system.

    I CAN'T look at everything, yes. Do you know my actual connexion speed is 5 ko/s (do you remember the EDGE ?) and very very often I CAN'T load pages. I try to do my best, so please stop acting like a real scum! :mad:

    You're welcome!

    Sorry, but I can't load your video (read my last message), but I'll see what I can do. I promise.

    Hum... Are your groups having inheritance?
    If a player a different permissions, the plugin will normally takes the highest.

    Edit:
    Great!
     
  28. Offline

    false_chicken

    So I just updated to 1.8.2 and the B key still doesn't work. The above is still true. I remember you said you where working on a new version to fix it. Is 1.8.2 the new version?
     
  29. Offline

    NeatMonster

    Nope. Download the debug version (delete the normal version), try to open you backpack, try some commands and post the log here (only the messages starting by [INFO] [SpoutBackpack] [Debug] are needed).
     
  30. Offline

    mrgreaper

    Hope the scum bit werent aimed at me too! i may be a bit defensive but it did feel like i was being called a lier.

    seeing what you can do is good enough (much better then "thats impossible" )

    my immediate thought is a option in the config file
    permissions = true/false
    ifpermisionsfalsebackpack=72 (here you set the number of spaces you want maybe a little #setting this to above 52 may cause crashes however some have had success with as high as 72 ;) )

    then it caters for those that want to limit the number on certain groups and those like me who want to have players as equals whereever possible
     
  31. Offline

    NeatMonster

    Enjoy! :p

    No comment for the moment.

    No, it was only for him/her. I haven't liked the "If you would have LOOKED at the pastebin. (...)".

    Now, for the both : you're funny guys, with your big connexions, I'm between two mountains, thanks to my iPhone I can have Internet very very very slowly, I can't download files bigger than 10 Mo, etc. Do you want me to stop support? I hope the answer is "No". When I tell "I'll see what I can do.", I really see what I can do. For example, I made a special lite version ONLY for you (mrgreaper) , and I have increased the size to 72 on this version ONLY for you (mrgreaper).

    So, please be respectful and everything will be ok.
     

Share This Page