[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

    Wiernusz

    Whoa crap man, you rock!! Thanks so much.. Where is your damned Donate button?
     
  3. Offline

    Ranzear

    There is zero reason it shouldn't work if I have SuperPermsBridge working as 3.0 permissions as it now does after I fixed the plugin.yml version.

    I think SuperPermsBridge reporting itself as 2.7.7 but using the 3.0 API has made a lot of people use the wrong hooks. You should probably give that a look if possible.

    But because of a bazillion other permissions problems I probably am switching back to Perms 3.0 if only because devs (yourself seemingly included) have no faith in PermsBukkit...
     
  4. Offline

    NeatMonster

    You're welcome!

    I don't have a PayPal button because I haven't expected any donation.
    But if you want to donate, this is my PayPal adress: neatmonster (at) hotmail.fr

    Edit:

    I'm not sure SuperPermsBridge has the APIs I need but I'll check his thread tomorrow and release a new version if it's possible. But for the moment, it's unsupported!
     
  5. Offline

    Ranzear

    And that's what I was pointing out is that SuperPermsBridge has been reporting itself as oldie 2.7.7 permissions but is actually bridging 3.0. Still far more of a headache than it needs to be.
     
  6. Offline

    meizme

    [​IMG]

    [​IMG]

    [​IMG]
    there ya go NM hope this helps, i wanted to be able to have the widgets text size match the acheivement box and command window's size.

    wow re-sized that doesn't look so bad, but click it to full size its HUGE

    oh just to test it, i reverted back to recommended builds on both sides for the Screenshots.

    BTW with the new latest dev build of spout and SpoutCraft "N" still opens the workbench but the B doesn't open the backpack, I'm sticking with the recommended build for now but you might want to find out why and stay ahead of the issue before its release as the new Rec. Build.

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

    NeatMonster

    API is the same for Permissions 2.7.7 and 3.1.6. I tested with SuperPermsBridge but it doesn't work. I don't know why.
    Edit: I tested everything, I can't do anything. I'm calling the API, no errors are displayed but it does nothing. Maybe the bridge is emulating the API to catch errors, not to be functional.

    This isn't a SpoutBackpack issue, it's a Spout(craft) issue. You must talk to @SpoutDev.
    Edit: Play in fullscreen (F11).

    I'll test with the development version.
     
  8. Offline

    meizme

    i was in fullscreen for the SS's
    and i have tried to talk to both wulfspider and topcat they literly ignored me and answered posts before and after mine, so its either a touchy subject or they're pretending its not an issue
    <(^.~)>b
     
  9. Offline

    NeatMonster

    I understand but I think I can't really do something for you.
     
  10. Offline

    meizme

    is that text size normal?
     
  11. Offline

    NeatMonster

    Yes. I find a setHeight and a setWidth, maybe I can do something with these methods.
    Edit: No, I can't really do anything. Only Spout dev' team can.
     
  12. Offline

    Mercury

    @NeatMonster - When taking stuff from backpack using shift and then opening portable workbench you will loose your items.
     
  13. Offline

    NeatMonster

    You've already reported that no? I've forgotten to correct this bug.
     
  14. Offline

    Mercury

    Did I? I might have reported another bug.
     
  15. Offline

    NeatMonster

    So it was somebody else.
    Bug will be fixed in the next version.
     
  16. Offline

    atlem

    there is a duplication bug when you die logg out die agien , there is dubbel dropp
     
  17. Offline

    NeatMonster

    Will see tomorow.

    Bukkit forums' iPhone app is great!
     
  18. Offline

    Ranzear

    Ah, so if I follow correctly from your post in the PermsBukkit thread, your upgrade method assigns a per-player permission of the next backpack size. This sounds like a silly way to do it when you're already tracking a player's backpack contents, why not just store their backpack size in the same file?

    Still, Yeti Permissions is done, over. Using permissions entries to store player data like that is like carving someone's phone number into your skin...
     
  19. Offline

    NeatMonster

    I agree but I prefer to use permissions (more user friendly). So for PermissionsBukkit, I'll make a new version with full support.
     
  20. Offline

    Ranzear

    What I meant was that a feature of your plugin shouldn't be concurrent with the feature of another now deprecate plugin. Changing your backpack size data storage makes your plugin more compatible with lots of things.

    You'll have to sooner or later when Perms 3.0 is officially dead, but really it's all about making your plugin more compatible with any permissions system, not just the ones that don't allow you to add permissions on a whim.

    Your method is what's wrong (storing backpack size as a permission) rather than PermsBukkit being wrong for not letting you alter player permissions; the API for which was a feature added to Perms 2.0/3.0 due to neither having a decent system for changing permissions in-game, so they enabled those calls so in-game permissions modifying plugins could be developed. PermissionsBukkit has it's own (decent) in-game permissions tools, so creating the API for your method is just unnecessary.
     
  21. Offline

    NeatMonster

    As I said, I understand, but not for a minor version, maybe for version 2.0.
     
  22. Offline

    raulx222

    I have this error(in server console) when I join on the server:
    Code:
    2011-08-21 13:14:05 [SEVERE] Could not pass event PLAYER_JOIN to SpoutBackpack
    java.lang.NoSuchMethodError: com.nijiko.permissions.PermissionHandler.has(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z
        at me.neatmonster.spoutbackpack.SpoutBackpack.allowedSize(SpoutBackpack.java:279)
        at me.neatmonster.spoutbackpack.SpoutBackpack.loadInventory(SpoutBackpack.java:253)
        at me.neatmonster.spoutbackpack.SBPlayerListener.onPlayerJoin(SBPlayerListener.java:25)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:244)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:124)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:74)
        at net.minecraft.server.Packet1Login.a(SourceFile:43)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:40)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Some help? Thanks !
    P.S.: Sorry for my bad english.
     
  23. Offline

    NeatMonster

    What's your permissions plugin? Post here your config.yml too.
     
  24. Offline

    raulx222

    I use GroupManager

    config:
    Code:
    LogTheSaves?: false
    PriceToUpgradeToThe45Backpack: 6500.0
    KeyUsedToOpenTheBackpack: B
    EnableTheWorkbench?: true
    Widget:
        PositionY: 5
        PositionX: 3
    UseGroupManager?: true
    IntervalInMinutesBetweenEachSaving: 5
    UseWidget?: false
    NameOfTheBackpack: Backpack
    WorldsWhoShareInventories:
    - world
    - world_nether
    PriceToUpgradeToThe54Backpack: 7500.0
    UsePermissionsBukkit?: false
    RegionsWhereBackpacksAreDisabled:
    - region1
    - region2
    PriceToUpgradeToThe27Backpack: 4500.0
    PriceToUpgradeToThe18Backpack: 3500.0
    UsePermissions?: true
    NeedsAWorkbenchInYourInventory?: false
    KeyUsedToOpenTheWorkbench: N
    SeparateInventories?: false
    PriceToUpgradeToThe36Backpack: 5500.0
    This is not the only error, I have other errors when I press B and N buttons. :)
    Sry for my bad english (again).

    And one more question. In "WorldsWhoShareInventories" I need to type the names of the world who can anybody use the backpacks ?(uhh...I have a very bad english...)
     
  25. Offline

    NeatMonster

    Code:
    (...)
    UsePermissions?: true
    (...)
    If you've set SeparateInventories? to true (different Backpacks in each world), WorldsWhoShareInventories allow some of those worlds to have common inventories.
     
  26. I have backpack 36
    When i teleport to a world without permissions for backpack, and teleport back, i lost everything except first line from backpack.

    SpoutBackpack v1.9.5 CB1060, MultiVerse 2.0
     
  27. Offline

    NeatMonster

    Interesting, thank you for the report.
     
  28. Offline

    RugRats

    On server restart everything in the backpack is lost.
     
  29. Offline

    NeatMonster

    Server restart or server crash?
     
  30. Offline

    RugRats

    Restart EDIT: Just tested it.
     
  31. Offline

    NeatMonster

    Okay, wait for version 2.0. I hope to release it soon, but it'll be difficult.
     

Share This Page