[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

    Taranis01

    what are the Spout(client?)-Features?
     
  3. Offline

    Gabriel333

    The plugin is depending on Spout on the server. If SpoutClient is used, it will be used for notifications.
     
  4. Offline

    Taranis01

    I would suggest keystroke combinations instead of a command. This way maybe more features like Convenient Inventory has, would be possible.
     
    Gabriel333 likes this.
  5. Offline

    Firemars

    Admin has no permissions? Wtf?
     
  6. Offline

    Gabriel333

    Well they should have. Are you using Permissions 3 or PermissionsBukkit? Im admin on my own server, and I have put the permissions "sortinventory.use" on the normal users. If there is an error you must give some more.

    I have put this on my "to do" list. :)

    EDIT: Hotkey Implemented!!! :cool:

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

    happypumkin

    how does this sort it? like tools first or something? or does it sort by ID maybe?
     
  8. Offline

    Moromillas

    Hi, hotkey does sound nice.

    Yeah, I can't get it to work with permissions. I have permissions 3, all the other permissions work bar this, just spits out "Your dont have proper permissions for that command. (sortinventory.use)" Well, that's what I have in the permissions config, 'sortinventory.use'.

    It may not be possible, but I would like to stack food and tools the same way you stack, I donno, blocks of dirt for example, and without the need for hotkeys or commands. Oh and putting a bunch of pork in the furnace... what a pain in the arse.

    You spelled "don't" wrong btw.
     
  9. Offline

    RustyDagger

    @Moromillas Thisd plugin dose not work with permissions 3 it needs a manager that supports superperms aka the system bukkit built. for the most part im glad to see devs not support permissions 2/3 what a pile of crap they are... superperms all the way.
     
  10. Offline

    Gabriel333

    Well I have implementet permissions for BOTH Permissions 3 and PermissionsBukkit. And I have tested it against both. You will see an [INFO] [SortInventory] Permissions xxxx detected. or [INFO] [SortInventory] PermissionsBukkit detected. in the server lock. IF BOTH are installed and IF there is a conflict, it will be PermissionsBukkit, who decides the permissions.

    Well at the moment it only sort and stack the items in the sequence the algorithm meets the items. But I have thought about what would be smart? Suggestions are welcome!!! The only thing I'm sure about is that I don't want the algorithm to move items around in slot 0 - 8 (where you kan press Key 1-9 to use the item, cause I think that people wants to decide that themself.

    What do you suggest?

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

    Don Redhorse

    hmm I know you do sorting only atm... but what about changing the plugin name to Inventory Manager or something and also allow chest transfer ... so moving stuff from inventory to the chest and vice versa?

    perhaps with options for the item you want to transfer.. like /si stash diamonds which would move diamonds from the inventory to a chest you are looking at if you can open that... hmm requires support for lockette and lwc etc though... sigh...

    btw: what is the fallback command for /sort as that is already taken by quite a lot of plugins..
     
  12. Offline

    Etarus

    Every time i try tu use it it say:
    You to dont have proper permissions for that command. (sortinventory.use)

    Whats wrong?
     
  13. Offline

    Gabriel333

    Do you use Permissions 3.1.6 or PermissionsBukkit? I have made 2 examples on Permissions-config-files, which works on my testserver.

    The USERS / USERGROUP should have the permission:
    Permissions 3.1.6:
    -'sortinventory.use'

    PermissionsBukkit
    sortinventory.use: true

    Could you please show me what you have written in your permissions-file? so I can see if you or I have made en error!
     
  14. Offline

    Etarus

    i use permissions 3.1.6
    i allready have this entry in the group file but it don't works. :(
     
  15. Offline

    Gabriel333

    Hmm... Im on work now and I can't run the client sw here, but I promise to do some more testing tonight, to see if I have made an error in my "permissiontest" it seems that there is more than one, which have problems with the permissions. So it start to look like if it is ME who has made the error :mad:.

    Could you please show me what you have written in the permissions file, so I can see if you have written the line in another way that I thought you would?
     
  16. Offline

    RustyDagger

    permissions 3 dont need the - befire the node and the ' ' are not required unless the node has numbers
     
  17. Offline

    Etarus

    My whole group file look like this:

    Code:
    groups:
        default:
            default: true
            permissions:
            inheritance:
            info:
                build: false
        Member:
            default: false
            permissions:
            - lwc.protect
            - falsebook.blocks.bridge
            - mywarp.warp.basic.warp
            - portalstick.teleport
            - general.clear
            - falsebook.blocks.gate
            - falsebook.blocks.door
            - falsebook.blocks.lift
            - falsebook.blocks.hiddenswitch
            - portalstick.placeportal
            - falsebook.blocks.readbooks
            - general.playerlist
            - stargate.use
            - war.player
            - nSpleef.member.join
            - nSpleef.member.leave
            - supernatural.command.list
            - supernatural.command.power
            - supernatural.player.shrineuse
            - supernatural.player.wolfbane
            - dimensiondoor.teleport
            - mcmmo.ability.*
            - mcmmo.skills.*
            - mcmmo.regeneration
            - falsebook.cart.booster2x
            - falsebook.cart.booster8x
            - falsebook.cart.brake25x
            - falsebook.cart.brake50x
            - falsebook.cart.station
            - falsebook.cart.collectanddeposit
            - falsebook.cart.eject
            - falsebook.cart.sort
            - falsebook.cart.emitter
            - falsebook.cart.reverse
            - gold.pickaxe
            - gold.axe
            - gold.shovel
            - gold.sword
            - mobarena.use.*
            - mobarena.classes.*
            - mobarena.arenas.*
            - sortinventory.use
            inheritance:
            info:
                build: true
        Admins:
            permissions:
            - '*'
            inheritance:
            - Member
    
     
  18. Offline

    Gabriel333

    Show Spoiler



    Thank you. I see one difference from how I make permissions in Permissions 3.1.6 I use: ' in front and after the permission.

    If this works for other plugins, my should of cause support that too. I will check that tonight, to see if I have made an error here.
     
  19. Offline

    Etarus

    ok thank you
     
  20. Offline

    Gabriel333

    I couldn't help it... :) I looked at my code again, I think I have made an error if you are OP one the server. I can't test it now, but I think that OP's has no permissions, which of cause is an error. I will check it tonight! That should be an easy fix :)
     
  21. Offline

    McLovn

    OP cant use command and when i use it i seem to loose items....
     
  22. Offline

    Gabriel333

    Okay. Thank you. The first thing is easy to fix. The second thing is a SERIOUOS problem I will have to fix tonight. If you can replicate the error where you loose items, it would be good to know.

    OP bug fixed in release 1.1.1. The other bug I will find tonight.

    The problem was that OP has no permissions. I have fixed that in version 1.1.1.

    Bug found and fixed in version 1.1.1

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

    toxycated

    seems there is a bit of a issue, some items are being removed from inventory/chests if you use /sort

    ie: 2256 (Gold Music Disc)
    if you have more than a single disc in inventory, it will be removed. :|

    I have not noticed others but thats not good.
     
  24. Offline

    Gabriel333

    I agree that NOT good. I will check that tonight. Have you seen this in both player inventory and in the chest inventory?
     
  25. Offline

    toxycated

    @Gabriel333 yes, it is VERY bad right now. Many users have ended up with missing items. diamonds, powered rails, redstone, you name it. seems random.
    I had to do a rollback and remove the plugin before anymore harm came of it.
     
  26. Offline

    Gabriel333

    I have removed the download link - until the the bug is found. I understand very well that you removed the plugin because of this!!! :mad:
     
  27. Offline

    toxycated

    it's a great idea and plugin, once that bug is eliminated! all my users were so excited for this but then items went missing :( good luck!
     
  28. Offline

    Gabriel333

    I THINK I have fixed it now in release 1.1.4, but I should properly do some more testing. I have changed the move process so it should be safe. (I have not tested that gold disc problem yet, but need to sleep a little now :).
     
  29. Offline

    Wolfwood

    I remember I had disappearing item problems early in the development of my sorting plugin but that was way back in February and I don't remember what caused it so sorry I can't help much here. I do like the Spout integration your doing. I do remember it took a while for me to get doublechests to be sorted the same way every time.
     
  30. Offline

    Gabriel333

    I check on all these 3 before moving anything:

    && fromitem.getTypeId() == toitem.getTypeId()
    && fromitem.getData() == toitem.getData()
    && fromitem.getDurability() == toitem.getDurability()

    and when i check the totalamount of items before and after moving. it should be safe.
     

Share This Page