[GEN] SortInventory v1.4.1 - Sort and stack your inventory [Spout] [Permissions] [1060]

Discussion in 'Inactive/Unsupported Plugins' started by Gabriel333, Aug 13, 2011.

  1. Offline

    Gabriel333

    SortInventory - Sort and stack inventories.
    Version: 1.4.1

    OBS: I have started my next generation of my plugin and changed the name to BukkitInventoryTools. I have made a Digital Lock for your inventories in BikkitInventoryTools. From now I will only make bugfix on SortInventory if there is any errors left.

    This is a little and useful utility which can stack and sort the players inventory, a chest inventory and doublechest inventory.

    Command: If you have SpoutCraft you just open the inventory and press Hotkey S
    If you don't have SpoutCraft you point at a chest and type /sort to stack and sort the items in the chest. Point anywhere else and type /sort to stack and sort the player inventory.

    Example before and after using Sort.
    [​IMG]

    Features:
    • SortInventory now also support SpoutBackpack. Open the backpack and press "S".
    • Does not stack tools, food, armor and vehicles in the first line in the players inventory
    • Uses PermissionsBukkit 1.1/Permissions 3.1.6/PermissionsEx 1.13 - if installed. Superperms is not tested. Is anybody using it?
    • Uses SpoutCraft for notifications, but SortInventory works also with MineCraft.
    • Stack all types of items
      • Permissions nodes so you decide which items can be stacked per. user.
    • Configurable Hotkey (see config.yml)
    • Configurable sort-order of all items (see config.yml)
    Download: http://dl.dropbox.com/u/36067670/SortInventory/SortInventory.jar

    Source:http://dl.dropbox.com/u/36067670/SortInventory/SortInventory.zip

    Depend:
    SortInventory depends on Spout on the server.

    To do:
    • Automatically create missing parameters in config.yml Done V1.2
    • User request: Implement activation by keystrokes (Configurable)...... Done! V1.1
    • Implement a configurable way of sorting in the config.yml. Done V1.2.5
    • User request: Integration to other inventories like SpoutBackpack.... Done! V1.2
    • User request: Implement permissionsnodes to specify which items the users can stack..... Done! V1.1.7
    • User request: Use the mouse to sort (like Hotkey S)
    • Integration to MyWolf's inventory.
    • Admins can configure which items in the 5 groups in config.yml Implemented in BukkitInventoryTools 2.0
    • User request: replace used item in slot 0-8, if they exist in slot 9-27. Like swords and food.
    Known bugs:

    • none
    Changelog:
    Version 1.4.1
    Version 1.4
    • Sort on Doublechests works now. I found some new features in Spout, which made it possible to use same stack and sort method, as I used one the player inventory, singlechest and SpoutBackpack Inventory.
    Version 1.3.1

    • Minor fix. I have just removed some "spam" messages in the console, which i made while I was trying to make Button to work and integration to MyWolf.
    • Permissions in plygin.yml is changed so
    Show Spoiler


    Version 1.3
    • Cleaned up the Permissions Class.
    • Integration to MyWolf has begun.
    Version 1.2.9
    • Bugfix: PermissionsEx didn't work, if PermissionsEx's bridge were loaded too!
    • Plugin.yml, now contain default permissions (OP). (Thanks to feildmaster for his tip)
    Show Spoiler


    Code:
    permissions:
        sortinventory.use:
            default: op
        sortinventory.stack.tools:
            default: op
        sortinventory.stack.armor:
            default: op
        sortinventory.stack.weapons:
            default: op
        sortinventory.stack.food:
            default: op
        sortinventory.stack.vehicles:
            default: op


    Version 1.2.8
    • PermissionsEx fixed and tested on my testserver. OP, PermissionsBukkit, Permissions 3.1.6 and PermissionsEx 1.13 has been tested and works now.
    Version 1.2.7

    • Reprogramming the order algorithm. Now its faster.
    • Sort on doublechest's works better, but NOT perfect. Stacking works, but order algorithm does not.
    Version 1.2.6

    • Small bugfix.
    Version 1.2.5

    • Sort-order can now be specified in config.yml
    Version 1.2.2

    • SortInventory now supports PermissionEx 1.13
    Version 1.2.1

    • small fix on version 1.2. Version 1.2 broke the sort-feature on the normal playerinventory. fixed.
    Version 1.2

    • SortInventory now works on SpoutBackpack, so you can sort/stack the backpack too.
    Version 1.1.9

    • Error when Config.yml was not up to date. fixed. It made the client crash.
    Version 1.1.8

    • Hotkey can only be used when player inventory or chest inventory is open.
    Version 1.1.7

    • Added permissionnodes to specifi which items the users can stack.
    Version 1.1.6

    • Made a small fix, which I hope will remove the error:
      [GRAVE] Could pass event CUSTOM_EVENT to SortInventory...
    Version 1.1.5

    • Bug: Users reported items lost, when sorting. Fixed.
    Version 1.1.4

    • Bug: Users reported items lost, when sorting. Fixed.
    Version 1.1.1

    • Bug: OP has no permissions. Fixed.
    Version 1.1

    • Implementet an configurable Hotkey. OBS. Delete the config.yml to get a new one.
    Version 1.0.1

    • Fixed minor bug in sendNotification class.
    Version 1.0

    • First release - my first plugin


    Permissions:
    The Users/Usergroups should have these permissions set
    Show Spoiler

    PermissionsBukkit
    sortinventory.use: true
    sortinventory.stack.tools: true
    sortinventory.stack.armor: true
    sortinventory.stack.weapons: true
    sortinventory.stack.food: false
    sortinventory.stack.vehicles: true
    or
    sortinventory.stack.*: true

    Permissions 3.1.6 and PermissionsEx 1.13
    - 'sortinventory.use'
    - 'sortinventory.stack.tools'
    - 'sortinventory.stack.armor'
    - 'sortinventory.stack.weapons'
    - 'sortinventory.stack.food'
    - 'sortinventory.stack.vehicles'
    or
    - 'sortinventory.stack.*'
    If you dont have a permission system
    Users will only have access to
    sortinventory.use
    OP will have acess to
    sortinventory.stack.armor: true
    sortinventory.stack.tools: true
    sortinventory.stack.weapons: true
    sortinventory.stack.food: true
    sortinventory.stack.vehicles: true
     
  2. Offline

    gameswereus

  3. Offline

    Tetra

    Edit : Nvm, apparently managed to miss the "Depend" part.
     
  4. Offline

    jycs

  5. i've got the same error when enabling the plugin i use spout 0.2 RB and bukitt 1060
     
  6. Offline

    Gabriel333

    Could you please check if you have this in the config.yml?

    ############################################################
    # +------------------------------------------------------+ #
    # | Properties for Sort Command | #
    # +------------------------------------------------------+ #
    ############################################################
    Sort:
    # Set the key to activate sort.
    # Deactivate the HOTKEY by setting SortKey: KEY_DEACTIVE
    SortKey: KEY_I



    Could you please check if you have this in the config.yml?

    ############################################################
    # +------------------------------------------------------+ #
    # | Properties for Sort Command | #
    # +------------------------------------------------------+ #
    ############################################################
    Sort:
    # Set the key to activate sort.
    # Deactivate the HOTKEY by setting SortKey: KEY_DEACTIVE
    SortKey: KEY_I



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

    jycs

    No, sorry I do not want and I'll sleep.


    Code:
    ############################################################
          Please, have mercy on me, I'm a bad developper.
              Gabriel333 the modder with red buttocks
    ############################################################
    ############################################################
    # +------------------------------------------------------+ #
    # |     Plugin configuration file for SortInventory      | #
    # |                                                      | #
    # |                                                      | #
    # +------------------------------------------------------+ #
    ############################################################
    
    ############################################################
    # +------------------------------------------------------+ #
    # |                        General                       | #
    # +------------------------------------------------------+ #
    ############################################################
    General:
        # Set Language. Currently supported: EN
        Language: EN
    
    ############################################################
    # +------------------------------------------------------+ #
    # |             Properties for Sort Command              | #
    # +------------------------------------------------------+ #
    ############################################################
    Sort:
        # Set the key to activate sort.
        # Deactivate the HOTKEY by setting SortKey: KEY_DEACTIVE
        SortKey: KEY_I
    
    ############################################################
    # +------------------------------------------------------+ #
    # |                  Properties for Debug                | #
    # +------------------------------------------------------+ #
    ############################################################
    Debug:
        Permissions: false
        SortInventory: false
        OnEnable: false
        Keyboard: false
    
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  8. thank a lot ! i add this to my config.yml and it work without error :
    Sort: # Set the key to activate sort. # Deactivate the HOTKEY by setting SortKey: KEY_DEACTIVE SortKey: KEY_R

    can you find a way to ignore the HOTKEY when you have the chatbox open ? beacause that spam a lot :)
     
  9. Offline

    The_Wrecker

    question,

    why do you include craftbukkit, bukkit and other library jars in the plugin jar?

    Remove those and your jar is alot smaller (like removing 10 MB) !
     
  10. Offline

    Gabriel333

    I did it because, then it is easier to move my code between my computers... but I agree, they are way to big, so I find anotherway to do it, so I keep the the jar small. They will be removed in next release...

    I need
    I need to reproduce the error if possible. I cant find a plugin called [GRAVE], is [GRAVE] the full name of the plugin?

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

    Wolfwood

    I'd suggest putting your code and dependencies in dropbox that way you can easily switch between your computers and all of your files are automatically up-to-date.
     
  12. Offline

    jycs

    Not for me...

    Ugly mod, I give up.
     
  13. Offline

    Gabriel333

    Okay - I can live with that :) I will though continue to make it better and nicer. Could you please tell me the name of the [Grave] plugin, I can't find a plugin with that name??? and I need to do some testing.
     
  14. Offline

    jycs

    How do I know?
     
  15. Offline

    Gabriel333

    Well it was you who send me the screendump and complained about an error at jycs, Yesterday at 3:07 PM So since it is your server you are the one who should know which plugins you have installed. I sorry I cant help you if you don't help me.

    Hi fonkfader. I have made a very small change, which I hope will remove the null-pointer-exception. Since I cant find [GRAVE] I have not tested it. I would appreciate if you could tell me, if the small fix helped.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  16. i think [GRAVE] isn't a plugin but a french bukkit traduction of [SEVERE] or [WARNING], you're last build run fine for me but if you could add a way to stop the plugin hotkey when you're chating that will be nice because that really spamming when you tiping in the chatand if you could add a node for item stacking, if i don't want regular players can stack bread or else...., thanks !
     
  17. Offline

    Gabriel333

    LOL!!!! I feel stupid now!!!! Anyway I'm happy that the fix worked.

    You have mentioned this chatting-error where the hotkey "spams" a couple of times, and I'm not sure about what you are talking about. I will look at that now, and then i will add some permission-nodes for what the users can stack.

    I solved the problem with the chatbox. You can only use the HOTKEY when the player inventory or a chest inventory is open. :) This means that you can use KEY_S as sort/stack key. I have changed the default key to KEY_S.

    I still need to investigate how to integrate to SpoutBackpack...

    I have added some permission-nodes, so you decide which items the users may stack. :cool:

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  18. great ! i test the 1.1.8 and its just perfect for me...and it will be more perfect when you'll add spoutbackpak support, thank you !
     
  19. Offline

    Gabriel333

    Im looking at that, because I think it is an great idea, but it is a little bit harder solve, so it will take some time. I will look at it in the weekend.
     
  20. Offline

    Iswim536

    I keep getting an internal error when i try to sort? I have the newest version of craftbukkit and spout
     
  21. Offline

    Gabriel333

    I need the error message in the console, to find the error.
     
  22. Offline

    vSanjo

    Yeah, i'm hoping this can be fixed!
    I get the '[Severe] Could not pass event CUSTOM_EVENT to SortInventory' thing - but it's exciting to have something like this! I'll wait out for it! :D
     
  23. Offline

    jycs

    error..
     
  24. spoutbackpack dev add an api, that will help you i think !
     
  25. Offline

    Gabriel333

    Yes, he made an API because I asked him to and since he wants to cooperate, Im sure I will make it.
     
  26. Offline

    Gabriel333

    Hi vSanjo. Please send me the FULL error message from the server console, else I will not be able to find the error!

    Dont you understand I need the full errormessage from the server console??? I can't find the error if I dont get the errormessage. The errormessage tells me whats wrong and at what line the error is!!!

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

    vSanjo

    As you wish!
    http://pastebin.com/EQcPvU8v
     
  28. Offline

    Gabriel333

    Perfect. I will find the bug tonight. I'm on work now.

    I have release a fix, which I hope will solve this. I could not test it here on my work :D. I think the problem was that your config.yml was not uptodate, if this is the case you should make a backup and the delete it. I think that the config.yml was missing a parameter!

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

    vSanjo

    Ah, okay! Was this my fault or just an overlooked bug?
    I did use a fresh install to test it for you, so I assume it was a now-fixed bug. I'm glad I could help (if I did!).

    EDIT: Works brilliantly, thank you! :D
     
  30. Offline

    Gabriel333

    Well - I dont know who's fault it is... :'(, but I will try to change the configuration part of the plugin so missing parameters automatically will be created in the config.yml, because then will none of the uses of this plugin see this kind of error anymore!

    Thank you for feedback, it is nice to know when a fix works! :)
     

Share This Page