Inactive [MECH] Stackable 0.5.1 - Control the stackability of any item [766]

Discussion in 'Inactive/Unsupported Plugins' started by DjDCH, Jan 18, 2011.

  1. Offline

    DjDCH

    Hello everybody,

    Since I started this topic to request a plugin who make sign stackable, I decide to make this plugin it myself. So, this is it!

    Stackable - Version 0.5.1

    This plugin provide you the ability to choose the stack size of any item in the game. You have the possibility to increase a stack size, reduce it or even disable it. Also, set a stack size to zero removed completely any stack of this item from the inventory.

    How to install:
    The only thing you need to do is download the zip containing the jar and unzip it in the plugins directory.

    How to configure:
    If you want to configure this plugin, edit the stackable.properties inside the directory Stackable, which is inside the plugins directory. You may want to remove or add item. Just use the enum name (from the class Material of Bukkit) or the item ID for the property name and the stack size for the property value. Any undefined item in the configuration file will use its default stack size value. For the items group, they are all listed in the default config file. You may want to remove it or edit the stack size value of any items group. Notice that define a item stack size who is contains in a items group will overwrite the value of the items group.

    How to use:
    While the proper events that I need are not implemented yet, you will need to use the command /stackable (or the aliases /s or /stack) to rebuild your item stacks (automatically rebuild inside your inventory) or the rebuild the chest content that you are aiming at. If your inventory or the chest become filled at any moment during the process, all supplementary item will be dropped in front of you/chest.

    Stack Protection feature:
    DeNarr make me notice that stacked item can be lost when using it. This is applying to item that is normally unstackable. In fact, these items weren't design to be used when stacked. So, I have come with this idea, to make something to protect stacks from being lost. This feature will split any stack of tools, weapons, buckets and soup when they are used. Notice that buckets will always be drop since a minecraft bug prevent me from adding the splited stack to the inventory. Notice also that the Stack Protection will not always working for tools and weapons when damaging a entity.

    Pickup event rebuilded:
    With this new update, the pickup event is now properly handled. When you will pickup an item, it will be added to any existent stack while respecting the stack size values from the config file.

    Todo:
    * Todo, etc. on my redmine
    * Add a configuration file
    * Re-organize configuration file
    * Re-organize source code
    * Implement all event hooks
    * Improve server log
    * Add sources and Javadoc
    * Add items group
    * Add Stack Protection feature

    Default configuration file:
    Code:
    # Enable debug print in game
    enable-debug-print=false
    
    # Tools items group. (Shovels, Pickaxes, Axes, Hoes and Fishing Rod)
    @tools=1
    
    # Weapons items group. (Swords and Bow)
    @weapons=1
    
    # Armors items group. (Helmets, Chestplates, Leggings and Boots)
    @armors=64
    
    # Foods items group. (Apple, Mushroom Soup, Bread, Raw Porkchop, Cooked Porkchop, Golden Apple, Raw Fish, Cooked Fish and Cake)
    @foods=32
    
    # Vehicles items group. (Boat and Minecarts)
    @vehicles=32
    
    # Sign
    sign=64
    
    # Wooden Door and Iron Door
    wood_door=64
    iron_door=64
    
    # Wool
    wool=32
    
    # Empty bucket
    bucket=16
    
    # Storage Minecart and Powered Minecart
    storage_minecart=16
    powered_minecart=16
    

    Changelog:
    See changelog (open)
    Code:
    Stackable - Version 0.5.1
    ----------------------------
        * Build with Bukkit #681
        * Tested with CraftBukkit #766
        
        Minor features changes
        -----------------------
        * Armors is now the stacks group for armor-like items and will replace amors stacks group
        * Amors stacks group now is deprecated and will be remove permantly in the next version
        
        Bug fixes/development issues
        -----------------------------
        * Fix code for the new Bukkit version
        
        Know bug
        ---------
        * Double chest are not supported
        * When using a bucket on a triggerable block, both event are execute
        * Mushroom Soup: http://getsatisfaction.com/mojang/topics/no_bowl_from_mushroom_soup
    
    Stackable - Version 0.5
    ----------------------------
        * Build with Bukkit #652
        * Tested with CraftBukkit #670
        
        Major features changes
        -----------------------
        * Pickup event rebuilded
        * Chest inventory can be rebuilded by aiming it when using the /stackable command
        
        Minor features changes
        -----------------------
        * Add aliases /s and /stack for /stackable
        
        Bug fixes/development issues
        -----------------------------
        * Fix code for the new Bukkit version
        
        Know bug
        ---------
        * Double chest are not supported
        * When using a bucket on a triggerable block, both event are execute
        * Mushroom Soup: http://getsatisfaction.com/mojang/topics/no_bowl_from_mushroom_soup
    
    Stackable - Version 0.4.6
    ----------------------------
        * Build with Bukkit #417
        * Tested with CraftBukkit #455
        
        Bug fixes/development issues
        -----------------------------
        * Fix code for the new Bukkit version
        
        Know bug
        ---------
        * Mushroom Soup: http://getsatisfaction.com/mojang/topics/no_bowl_from_mushroom_soup
    
    Stackable - Version 0.4.5
    ----------------------------
        * Build with Bukkit #412
        * Tested with CraftBukkit #432
        
        Bug fixes/development issues
        -----------------------------
        * A lot of fix code for the new Bukkit version
        
        Know bug
        ---------
        * Mushroom Soup: http://getsatisfaction.com/mojang/topics/no_bowl_from_mushroom_soup
    
    Stackable - Version 0.4.4
    ----------------------------
        * Build with Bukkit #144
        * Tested with CraftBukkit #323
        
        Major features changes
        -----------------------
        * Added Stack Protection feature
        
        Minor features changes
        -----------------------
        * Switch to new onCommand method
        * Property enable-short-command is now unused
        
        Bug fixes/development issues
        -----------------------------
        * Fix code for the new Bukkit version
        
        Know bug
        ---------
        * Mushroom Soup: http://getsatisfaction.com/mojang/topics/no_bowl_from_mushroom_soup
        * Stack protection is sometime buggin
    
    Stackable - Version 0.4.3
    ----------------------------
        * Build with Bukkit #102
        * Tested with CraftBukkit #210
        
        Bug fixes/development issues
        -----------------------------
        * Fix code for the new Bukkit version
    
    Stackable - Version 0.4.2
    ----------------------------
        * Build with Bukkit #82
        * Tested with CraftBukkit #161
        
        Minor features changes
        -----------------------
        * Code design improved
        
        Bug fixes/development issues
        -----------------------------
        * Forgot to add bow to the weapon items group
    
    Stackable - Version 0.4.1
    ----------------------------
        * Build with Bukkit #71
        * Tested with CraftBukkit #135
        
        Bug fixes/development issues
        -----------------------------
        * Properly disable the plugin when initialization error occurred
        * Forgot to add fish to the food items group
    
    Stackable - Version 0.4
    ----------------------------
        * Build with Bukkit #68
        * Tested with CraftBukkit #128
        
        Major features changes
        -----------------------
        * Add five general items group
        * Sources now available.
        
        Minor features changes
        -----------------------
        * Default configuration file update
        * Javadoc added to all source files
        
        Bug fixes/development issues
        -----------------------------
        * Made damaged tools unestackable to avoid auto repared tools
        * MaterialData is now keep for Wools and Dyes
    
    Stackable - Version 0.3.1
    ----------------------------
        * Build with Bukkit #57
        * Tested with CraftBukkit #89
        
        Bug fixes/development issues
        -----------------------------
        * Forgot to update the default configuration file
    
    Stackable - Version 0.3
    ----------------------------
        * Build with Bukkit #57
        * Tested with CraftBukkit #89
        
        Major features changes
        -----------------------
        * Configuration file completely redesigned
        * Possibility to choose the stack size
        * Possibility to limit the stackability of already stackable item
        * Item groups removed
        
        Minor features changes
        -----------------------
        * Server log improved
        * Code design improved
        
        Bug fixes/development issues
        -----------------------------
        * Stability improved
    
    Stackable - Version 0.2
    ----------------------------
        * Build with Bukkit #56
        * Tested with CraftBukkit #86
        
        Major features changes
        -----------------------
        * Added configuration file 
        * Added groups of item stack
        
        Minor features changes
        -----------------------
        * Server log improved
    
    Stackable - Version 0.1
    ----------------------------
        * First release
        * Build with Bukkit #56
        * Tested with CraftBukkit #80
        
        Major features changes
        -----------------------
        * Added /stackable command
        * Sign, Wooden door and Iron door are now stackable

    Download Stackable Version 0.5.1 (zip)
    Download Stackable sources version 0.5.1
    Thanks to you for supporting my plugin ! ;P
     
    wassilij, Jef Elrod, harakiwi and 2 others like this.
  2. Offline

    bdot

    I'm not sure how that's working correctly if the items don't actually get stacked. I forgot to mention that I had already configured the stackable.properties file. For testing puposes I tried using @tools=5 and gave myself 10 diamond shovels. Using /stackable should put them into 2 stacks of 5 each, correct? Instead it just moves them all into the quickbar slots, unstacked.

    Edit: I beleive /s is being used by Essentials as a teleport alias. Using /s <argument> displays "Teleporting..." although I haven't tried it with valid arguments. Essentials is the only plugin I have for teleport commands.

    If it helps, I'm using CB295 and Stackable 0.4.3


    UPDATE: It has started working some of the time but other times spits out "Too many parameters". Seems like there is a kink or two to work out but it does work most of the time. I do really enjoy the plugin, thanks for making this!
     
  3. Offline

    DjDCH

    Version 0.4.4 released

    This version update Stackable for the latest version of Craftbukkit. This is also make the aliases /s permanent, so the property enable-short-command is now unused. You may want to remove it. And finally, a new functionality has been added to Stackable. This feature is call Stack Protection. See this quote from the first post:

     
  4. Offline

    x3no

    So this is fixing the issue when i had a stack of Diamond Picks and all had the same damage-level when i split them?
     
  5. Offline

    DjDCH

    The Stack Protection will correctly split the stack, even if it already damage or not.
     
  6. Offline

    captainjamie

    Food items will not stack for me no matter what i do. Tried re-installing, and changing the congfig multiple times - it just aint working.
     
  7. Offline

    x3no

    Nice, working great now! [​IMG]
     
  8. Offline

    bdot

    @DjDCH can you explain how the stack protection works a bit more for me? My players haven't noticed stacks disappearing or anything like that. What are the circumstances that they could lose a stack of tools using them normally?

    Is this similar to the creative block bug, where if you give yourself an infinite stack of a block and then attack a mob with block in hand it disappears? I.E. using the item for unintended purpose makes you lose it, or is this something different that is happening all the time?
     
  9. Offline

    Faust

    This is truly a must have plugin. Great work!

    Edit: I should read the first post more carefully
     
  10. Offline

    x3no

    The users on my server are telling me there is another problem: If you put one damaged tool (via leftklick) on top of a stack of new tools, you switch the tool with the stack, but the damage then gets transfered to the stack. So if you had one damaged tool and a stack of 10 new tools, you end up with 10 damaged tools in your hand, and one new.

    Also it seems you can stack more tools then allowed via leftklick. I configured a stack size of 16 for tools, but you can circumvent this if you put a stack of 16 on top of another stack of 16, then you get 31 + 1 in your hand.
     
  11. Offline

    QQCucumber

    I don't see it mentioned anywhere in this thread, but WorldGuard conflicts with this plugin because it has a /stack functionality as well.
     
  12. Offline

    x3no

    I'm not using WorldGuard, has to be something else... [​IMG]
     
  13. Offline

    QQCucumber

    It wasn't directed at you, I was just so confused why I couldn't get it to work according to the config and I find out it's because WorldGuard provides the function.
     
  14. Offline

    Silvo

    instaled, reinstaled, reinstaled again, configured config each time, doesn't work

    Craftbukkit version git-Bukkit-0.0.0-409-gcb2bced
    ..

    do I miss something? install file into plugins folder, start server to get config, stop server, edit config, start server .. no error reported from server, checking if works ........... (stacking food) ... doesn't work

    I envy those who can get this awsome plugin to get work. I really want it bad on my server.
    --- merged: Feb 18, 2011 6:14 AM ---
    tried something else... edited the config manual instead of copying the one posted

    Code:
    # Enable debug print in game
    enable-debug-print=false
    #
    apple=64
    Brown_Mushroom=64
    Red_Mushroom=64
    282=64
    bread=64
    319=64
    320=64
    golden_apple=64
    raw_fish=64
    cooked_fish=64
    cake=64
    wood_door=64
    iron_door=64
    bucket=16
    wool=64
    sign=64
    boat=32
    minecart=32
    storage_minecart=16
    powered_minecart=16
    you can notide ID 319,320 and 282. The plugin just wouldn't accept raw_porkchop, cooked_porkchop and soup.

    Still... it doesn't work.
     
  15. Offline

    enkryptor

    What do you mean? Have you tried /s command?
     
  16. Offline

    DigidragonZX

    it works with /s command but... another plugin (plgessensials) uses this command too... so then it won't
     
  17. Offline

    amplifier

    As there's a command for this plugin, what permission do i have to use to make the command usable?
     
  18. Offline

    DigidragonZX

    when i type in /s or /stackable nothing happens (server gives command /s:1 or /stackable:1) need to update you're plugin? + it did not create the properties file... i needed to create it myself.... ??
    --- merged: Feb 20, 2011 4:19 PM ---
    i think its usable for everyone.... no permissions support
     
  19. Offline

    Kevin Forte

    Code:
    2011-02-20 13:01:03 [INFO] Stackable: Configuration file loaded.
    2011-02-20 13:01:03 [SEVERE] Feb 20, 2011 1:01:03 PM org.bukkit.craftbukkit.Craf
    tServer loadPlugins
    SEVERE: ENTITY_DAMAGEDBY_ENTITY (Is it up to date?)
    java.lang.NoSuchFieldError: ENTITY_DAMAGEDBY_ENTITY
            at com.djdch.bukkit.stackable.Stackable.onEnable(Stackable.java:113)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:426)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:187)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:74)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:55)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:179)
            at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:166)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:118)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:217)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    Possible problem?
     
  20. Offline

    th3sarg

    Getting the same as Kevin, just updated Bukkit to #428 so guessing its due to that.

    iMonster is doing the same with the ENTITY_DAMAGEDBY_ENTITY so guessing it's a change in that.
     
  21. Offline

    DigidragonZX

    It won't work for me .... ime on build 339.. you know whats wrong?
     
  22. Offline

    oOunrealOo

    i opened it up in wordpad and it was hard 2 read
     
  23. Offline

    hansudo

    Does that mean you could in future make stacking automatic without commands?
     
  24. Offline

    DjDCH

    OMG. So much post and I didn't receive any alert ... why ?:eek:

    From how you explain your example, yes it's very similar. What the Stack Protection feature does exactly, it's protecting your stack of item from being damage or lost when you're using an item (eat, drop/pick water, mine, damage, etc) depending what you are using/mining exactly. How this is exactly buid in the plugin, is that the plugin listen three different events, such as BlockDamage, PlayerItem and EntityDamage. When the event is triggered, the plugin will check if a stack is concern, and if yes, will split the stack before the event is execute. ;)

    Yes and yes. I already know that. I currently cannot do anything about that since I don't have the proper event hooks to listen and prevent that problem to happening. But, when all event hooks will be implemented, this will not happen anymore.:)

    Thanks to tell me. But as I see, no command is conflicting, and I also thinking that no event is conflicting too.

    HA ! Now I see why it doesn't work. You don't know how to read ! :p Citation from the first post:
    You are using the mincraft item name, not the bukkit material name. That's the problem. See the link in the citation for list of all material name.

    These errors are due to a bukkit code re-organisation. It will be fix in the next version of Stakable and it will work whit the current recommended craftbukkit version (now #432).

    Yes it will be done all naturally without any command.:cool:

    EDIT: If I missed a post that I didn't replied in this post, please, notify me.
     
  25. Offline

    Silvo

    funny.. Use #424 and this plugin works as it should. Now recommended is #432 and it has errors in it? I'm hesitant to upgrade to #432 then. At least my cb won't get upgraded until I get a comfirmaion that Stackables work on that upgrade. This plugin is just to important to me ^^
     
  26. Offline

    Sansai86

    Hello :)

    running CB 435 and getting this:
    Code:
    2011-02-24 06:14:21 [WARNING] Stackable: Material enable-short-command undefined
    , skipping.
    2011-02-24 06:14:21 [INFO] Stackable: Configuration file loaded.
    2011-02-24 06:14:21 [SEVERE] ENTITY_DAMAGEDBY_ENTITY (Is it up to date?)
    java.lang.NoSuchFieldError: ENTITY_DAMAGEDBY_ENTITY
            at com.djdch.bukkit.stackable.Stackable.onEnable(Stackable.java:113)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:426)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:187)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:76)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:57)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
     
  27. Offline

    YoShiiro

    yes the version 0.4.4 doesn't work with the new craftbukkit, but when i'm load the version 0.4.3, no SEVERE error only the error:

     
  28. Offline

    KCMO_HITMAN

    was hoping to get an update on this plz
     
  29. Offline

    DjDCH

    Version 0.4.5 released

    Today, is the day ! I finally got the time to update Stackable. :D None feature has been added, but at least, it's working with the latest recommended build. As soon I have time, I will take the first step towards the automation, with implementing the onPlayerPickupItem event.
     
  30. Offline

    YoShiiro

    Hi

    I already have the same error
    but in my stackable.properties i have :

    if you have the answer
     
  31. Offline

    DjDCH

    So, it's normal that you get this error since you have not removed this property from your config file.
     

Share This Page