[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

    Parlez

    Well the latest dev builds do not work with this plugin, so i sense a plugin breaking change you may need to prepare for in the the new version :\ i am now using dev build 27 as the herobrine requires it, and backpack is up and running.
    This is perfect. Paying for extra inventory room is great on a RPG server :)
     
  3. Offline

    NeatMonster

    I'll update my plugin when Spout will have a new recommended build.

    Edit:
    Enjoy! :D

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

    DeagleDryan

    Hey!
    First of all, thanks for the awesome plugin, i really like it!
    I have one problem. I tested it out and bought two times an upgrade an i have now 27slots. Now i want 9 slots back, but i don't know how to do this. I already deleted the inventory-file and also changed it to 9, but every time i start the game i have 27 slots again.
    Can you help? :)
    The Permission:
    - '*'
    - '-admincmd.player.*'
    - 'admincmd.player.list'
    - '-admincmd.item.repair'
    - '-admincmd.item.repair.other'
    - '-CommandIConomy.Free'
    - 'backpack.size9'
    - '-backpack.size18'
    - '-backpack.size27'
    - '-backpack.size36'
    - '-backpack.size45'
    - '-backpack.size54'

    Can you help? :)
    Thanks!
     
  5. Offline

    NeatMonster

    I'm pretty sure you haven't remove the backpack.size27 node in users.yml.
    It's the only thing you need to change in this case.
    Edit: And don't forget to /reload or reboot.
     
  6. Offline

    theakore

    No one can access their backpack after someone uses the /reload command. any ideas on what might cause this? the logs dont show any errors.
     
  7. Offline

    DeagleDryan

    Thank you very much!
    I only use the globalgroups and globalusers, therefore i didn't check the worlds one.

    Keep going!
    You are awesome!
     
  8. Offline

    NeatMonster

    I'm investigating.
    Edit: It's working fine for me. Give me more info.

    You're welcome! Thank you for your support!
     
  9. Offline

    theakore

    Im
    I suspect its a spout and/or permissionsbukkit issue now, after a bit of testing ive found that after /reload the server also resets permissions and everyone becomes a default user... i'll ask the spout and permissions bukkit devs about it.

    thanks for your help.
     
  10. Offline

    NeatMonster

    I was thinking you were taking about /backpack reload. You should ask PermissionsBukkit, not Spout developers.
     
  11. Offline

    Havoxx

    Awesome, thanks for the update, and yea, seems it was the dev build of spout acting up, I appreciate it, you keep up the good work!
     
  12. Offline

    NeatMonster

    Okay. As I said, I'll update when a new RB will be released.
    Edit: Maybe I'll add a second version compatible with dev builds.
     
  13. Offline

    Rogueleader89

    Bunch of errors, pretty sure its permissions related, nothing in the plugin works, running version 2.5.5 of the permissions plugin.
    Show Spoiler

    2011-08-14 12:37:22 [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:254)
    at me.neatmonster.spoutbackpack.SpoutBackpack.loadInventory(SpoutBackpack.java:228)
    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:332)
    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:33)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-08-14 12:37:28 [SEVERE] Could not pass event PLAYER_TELEPORT 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:254)
    at me.neatmonster.spoutbackpack.SBPlayerListener.onPlayerTeleport(SBPlayerListener.java:42)
    at org.bukkit.plugin.java.JavaPluginLoader$8.execute(JavaPluginLoader.java:293)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at org.bukkit.craftbukkit.entity.CraftPlayer.teleport(CraftPlayer.java:216)
    at com.onarandombox.Rigby.MultiVerse.MVCommands.MVTP(MVCommands.java:651)
    at com.onarandombox.Rigby.MultiVerse.MultiVerse.onCommand(MultiVerse.java:203)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:320)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:713)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  14. Offline

    NeatMonster

    Update to Permissions 3.1.6.
     
  15. Offline

    Derrick Mehaffy

    Problem found with DEV 1.8 The keybind for the workbench will open the work bench while trying to type in chat. I have mine set to V key in the config, If i try and type the key in chat it will open the workbench. In which case You can not type the letter the Workbench Is binded to.
     
  16. Offline

    NeatMonster

    Very good reply! Thank you very much! I'll will upload a new development version in a couple of hours.
     
  17. Offline

    Wesley211

    Hey,
    Im having an error when im connection to my server.
    Code:
    2011-08-14 20:55:53 [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:254)
        at me.neatmonster.spoutbackpack.SpoutBackpack.loadInventory(SpoutBackpack.java:228)
        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:332)
        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:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    I do have the spout plugin in my server, and aswell in my client. You know how to fix this?
     
  18. Offline

    Spiritwind

    For some reason it is not letting me use the hotkey B to access the backpack, any ideas??
     
  19. Offline

    NeatMonster

    Do you have Permissions installed? What version?

    You don't have the correct permissions. Show me your users.yml and groups.yml.
     
  20. Offline

    Spiritwind

    Where would it be? Using Mcmyadmin.
    Also using Permissions 3.1.6
     
  21. Offline

    NeatMonster

    I don't use McMyAdmin. In the panel where you can set the permissions, add the correct nodes (see in the OP).

    Issue fixed in development version 1.8_02.

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

    Mercury

    @NeatMonster - OnDeath player still looses items in backpack.
    Using 1.8 dev.
     
  23. Offline

    Ranzear

    Same here. Have backpack.nodrop for users and '*' permissions as admin and it still drops all of the items.

    RB1000, Permissions 3.1.6, 'walk into the other room and kick it in the grille' server.
     
  24. Offline

    Wesley211

  25. Offline

    NeatMonster

    Oups... I've forgotten a ! in my code. Redownload the .JAR.

    So, you probably have GroupManager. But it's strange because the plugin detected you've Permissions.
    Can you write me a list of all the .JAR contained in your plugins folder?
     
  26. Offline

    Wesley211

    Code:
    - Essentials.jar
    - EssentialsChat.jar
    - EssentialsGroupBridge.jar
    - EssentialsGroupManager.jar
    - EssentialsSpawn.jar
    - Mobarena.jar
    - ScubaKit.jar
    - SpongeRestore.jar
    - Spout.jar
    - Worldedit.jar
    
    Tell me if u need to know anything else
     
  27. Offline

    NeatMonster

    Let me explain the error : when SpoutBackpack is loaded, it checks if Permissions is installed. Because you've got EssentialsGroupBridge, it tells to SpoutBackpack "Yes, Permissions is installed!". And when SpoutBackpack tries to use Permissions, it failed.

    So you've got three options :
    • Delete EssentialsGroupBridge and EssentialsGroupManager, and use Permissions (recommended) ;
    • Delete EssentialsGroupBridge but some other plugins may not work ;
    • Don't use SpoutBackpack (not recommended :p).
     
  28. Offline

    Wiernusz

    So is this not good to use with PermissionsBukkit/SuperPermsBridge combined?

    Players are having an issue with the backpack upgrade.

    Also curious as to weather I'd need to set EACH group with the permissions, or if this is inheriting properly.


    I could post you my log if you wish.
     
  29. Offline

    NeatMonster

    You can use PermissionsBukkit! You seemed to use GroupManager.
    Inheriting is working with Permissions, PermissionsBukkit, GroupManager.
    If you've an error in the console, yes please post the log.
     
  30. Offline

    Wiernusz

    Well, I have no errors. I use Permissions Bukkit with the bridge, and use MCMyAdmin to set them. Doubt MCMyAdmin is the cause.


    To be more specific, it's taking money out of players accounts, and just not giving them a bigger backpack.


    Your non-dev version; This uses utilizes Spoutcraft 1.01, correct?

    I noticed Spout did away with the whole BAT file deal; almost wondering if players running different versions of spout could have corrupted. I'll do a fresh install with nothing but spout/backpack/run on spoutclient with PermBukkit and Superpermsbridge.

    This will take me a bit; but hope it may help.
     
  31. Offline

    NeatMonster

    With PermissionsBukkit, you shouldn't be able to use the upgrade function. I think the plugin detects Permissions because of the bridge. I haven't think about that before. I must implement manual toggles for the permissions system. Development version will be updated soon. Maybe I'll release without the furnace function.

    Yes, the non-development version is using the version 1.0.1 of Spout.
     

Share This Page