[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

    feildmaster

    ah, it's because of the issue I said. Don't search for "PermissionsBukkit" only do the player.has() (what you said you'd do in the next release)
     
  3. Offline

    Gabriel333

    Ehhh? I dont understand this. Why should I not search for PermissionsBukkit???

    This is my "setup" Method, i dont understand why it makes troubles for SuperPerms?

    Show Spoiler

    Code:
    public static void setupPermissions(Plugin plugin) {
            PERMISSION_NODE = plugin.getDescription().getName() + ".";
            if (permissions3 || permissionsBukkit || permissionsex) {
                G333Messages
                        .showWarning("Your permission system is allready detected!");
                return;
            } else {
                int numberOfPermissionSystems = 0;
                // PermissionsBukkit
                if (permissionsBukkitPlugin == null) {
                    permissionsBukkitPlugin = plugin.getServer().getPluginManager()
                            .getPlugin("PermissionsBukkit");
                    if (permissionsBukkitPlugin != null) {
                        permissionsBukkit = true;
                        G333Messages.showInfo("PermissionsBukkit is detected.");
                    }
                    numberOfPermissionSystems++;
                }
                // Permission3
                if (permissions3Plugin == null) {
                    permissions3Plugin = plugin.getServer().getPluginManager()
                            .getPlugin("Permissions");
                    if (permissions3Plugin != null) {
                        permission3Handler = ((Permissions) permissions3Plugin)
                                .getHandler();
                        permissions3 = true;
                        G333Messages
                                .showInfo("Permissions3/SuperpermBridge is detected. "
                                        + ((Permissions) permissions3Plugin)
                                                .getDescription().getFullName());
    
                    }
                    numberOfPermissionSystems++;
                }
                //PermissionEx
                if (permissionsExPlugin == null) {
                    permissionsExPlugin = plugin.getServer().getPluginManager()
                            .getPlugin("PermissionsEx");
                    if (permissionsExPlugin != null) {
                        G333Messages.showInfo("PermissionsEx is detected.");
                        permissionsex = true;
                    }
                    numberOfPermissionSystems++;
                }
                // No permission systems found
                if (permissions3Plugin == null && permissionsBukkitPlugin == null
                        && permissionsExPlugin == null) {
                    G333Messages
                            .showInfo("PermissionsBukkit/Permissions3/PermissionsEx system not detected, defaulting to permissions in plugin.yml");
                    return;
                }
                if (numberOfPermissionSystems > 1) {
                    G333Messages
                            .showInfo("OBS. More than one permission system detected. The test sequence is: PermissionsBukkit, Permissions/PermissionsBridges, PermissionsEx");
                }
    
            }
        }
    and this is my hasPerm();

    Code:
    SpoutPlayer sPlayer = (SpoutPlayer) sender;
    
            if (permissionsBukkit) {
                if (sPlayer.hasPermission((PERMISSION_NODE + label).toLowerCase())) {
                    return true;
                } else {
    
                    return false;
                }
            }
            if (permissions3) {
                // Permissions3 or SuperpermBridge
                if (permission3Handler.has(sPlayer,
                        (PERMISSION_NODE + label).toLowerCase())) {
                    return true;
                } else {
                    return false;
    
                }
    
            }
            if (permissionsex) {
                PermissionManager permissionsexManager = PermissionsEx
                        .getPermissionManager();
                if (permissionsexManager.has(sPlayer,
                        (PERMISSION_NODE + label).toLowerCase())) {
                    return true;
                } else {
    
                    return false;
                }
            }
            // The user had no permissions.
            return false;
     
  4. Offline

    feildmaster

    Because you don't need to...! It should simply default to if "player.hasPermission()"

    lets take your permissions.java library for example:
    Code:
    package dk.gabriel333.Library;
    
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.Plugin;
    
    import com.nijiko.permissions.PermissionHandler;
    import com.nijikokun.bukkit.Permissions.Permissions;
    
    //import PermissionsEx classes
    import ru.tehkode.permissions.PermissionManager;
    import ru.tehkode.permissions.bukkit.PermissionsEx;
    
    public class G333Permissions {
    
        public static String PERMISSION_NODE;
    
        // Hook into Permissions 3.xxx
        public static PermissionHandler permission3Handler;
        public static Boolean permissions3 = false; // Permissions3 or
                                                    // SuperpermBridge
        // Hook into PermissionsBukkit
        public static Boolean permissionsBukkit = false; // PermissionsBukkit
                                                            // support
    
        // Hook into PermissionsEx
        public static Boolean permissionsex = false; // Permissionsex support
    
        // Initialize all permissionsplugins
        public static void setupPermissions(Plugin plugin) {
            PERMISSION_NODE = plugin.getDescription().getName() + ".";
            if (permissions3 || permissionsBukkit || permissionsex) {
                G333Messages
                        .showWarning("Permissions3 or PermissionsBukkit is allready detected!");
                return;
            } else {
    
                Plugin permissions3Plugin = plugin.getServer().getPluginManager()
                        .getPlugin("Permissions");
                Plugin permissionsBukkitPlugin = plugin.getServer()
                        .getPluginManager().getPlugin("PermissionsBukkit");
                Plugin permissionsexPlugin = plugin.getServer().getPluginManager()
                        .getPlugin("PermissionsEx");
                if (permissions3Plugin == null && permissionsBukkitPlugin == null
                        && permissionsexPlugin == null) {
                    G333Messages
                            .showInfo("PermissionsBukkit/Permissions3/PermissionsEx system not detected, defaulting to OP");
                    return;
                } else if (permissionsBukkitPlugin != null) {
                    permissionsBukkit = true;
                    G333Messages.showInfo("PermissionsBukkit is detected.");
                } else if (permissions3Plugin != null) {
                    permission3Handler = ((Permissions) permissions3Plugin)
                            .getHandler();
                    permissions3 = true;
                    G333Messages
                            .showInfo("Permissions3/SuperpermBridge is detected. "
                                    + ((Permissions) permissions3Plugin)
                                            .getDescription().getFullName());
                    if (permissionsBukkit) {
                        G333Messages
                                .showInfo("OBS. If conflict in PermissionsBukkit and Permissions3/SuperPerm, PermissionsBukkit wins over Permissions/SuperPerm");
                    }
    
                } else if (permissionsexPlugin != null) {
                    G333Messages.showInfo("PermissionsEx is detected.");
                    permissionsex = true;
                }
    
            }
        }
    
        // Test if the player has permissions to do the action
        public static boolean hasPerm(CommandSender sender, String label) {
    
            // How to hook into PermissionsBukkit
            // Basic Permission Check
            // In this example (MyPlugin) is meant to represent the name of your
            // plugin,
            // for example... iConomy would look like:
            // Player player = (Player) sender;
            // if (player.hasPermission("a.custom.node") {
            // return true;
            // }
    
            // How to hook into Permissions
            // Basic Permission Check
            // In this example (MyPlugin) is meant to represent the name of your
            // plugin,
            // for example... iConomy would look like:
            // if (!(MyPlugin).permissionHandler.has(player, "a.custom.node")) {
            // return;
            // }
            // Checking if a user belongs to a group
            // if (!(MyPlugin).permissionHandler.inGroup(world, name, groupName)) {
            // return;
            // }
    
            // Permission check
            // if(permissions.has(player, "yourplugin.permission")){
            // yay!
            // } else {
            // houston, we have a problems :)
            // }
    
            // if (sender.isOp())
            // return true;
    
            Player p = (Player) sender;
            if (sender.isOp() && (sender instanceof Player)) {
                // OP is allowed
                return true;
            } else if (permissionsBukkit) {
                if (p.hasPermission(PERMISSION_NODE + label)) {
                    // if (debugmode("Debug.Permissions"))
                    // p.sendMessage(ChatColor.GREEN
                    // + "PermissionsBukkit: You have permission to:"
                    // + PERMISSION_NODE + label);
                } else {
                    // if (debugmode("Debug.Permissions"))
                    // p.sendMessage(ChatColor.BLUE
                    // + "PermissionsBukkit: You dont have permission to: "
                    // +PERMISSION_NODE + label);
                }
                return (p.hasPermission(PERMISSION_NODE + label));
            } else if (permissions3) {
                // Permissions3 or SuperpermBridge
                if (permission3Handler.has(p, PERMISSION_NODE + label)) {
                    // if (debugmode("Debug.Permissions"))
                    // p.sendMessage(ChatColor.GREEN
                    // + "Permissions3 You have permission to: "
                    // + PERMISSION_NODE + label);
                } else {
                    // if (debugmode("Debug.Permissions"))
                    // p.sendMessage(ChatColor.BLUE
                    // + "Permission3: You dont have permission to: "
                    // + PERMISSION_NODE + label);
                }
                return (permission3Handler.has(p, PERMISSION_NODE + label));
            } else if (permissionsex) {
                PermissionManager permissionsexManager = PermissionsEx
                        .getPermissionManager();
                if (permissionsexManager.has(p, PERMISSION_NODE.toLowerCase() + label.toLowerCase())) {
                    //G333Messages.showInfo("Permission node:"+PERMISSION_NODE+label+" TRUE");
                    return true;
                } else {
                    //G333Messages.showInfo("Permission node:"+PERMISSION_NODE+label+" FALSE");
                    return false;
                }
            } else {
                // The user had no permissions. returns false;
                return false;
            }
        }
    }
    You could do this:
    Code:
    package dk.gabriel333.Library;
    
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.Plugin;
    
    import com.nijiko.permissions.PermissionHandler;
    import com.nijikokun.bukkit.Permissions.Permissions;
    
    //import PermissionsEx classes
    import ru.tehkode.permissions.PermissionManager;
    import ru.tehkode.permissions.bukkit.PermissionsEx;
    
    public class G333Permissions {
    
        public static String PERMISSION_NODE;
    
        // Hook into Permissions 3.xxx
        public static PermissionHandler permission3Handler;
        public static Boolean permissions3 = false; // Permissions3 or
                                                    // SuperpermBridge
    
        // Hook into PermissionsEx
        public static Boolean permissionsex = false; // Permissionsex support
    
        // Initialize all permissionsplugins
        public static void setupPermissions(Plugin plugin) {
            PERMISSION_NODE = plugin.getDescription().getName() + ".";
            if (permissions3 || permissionsex) {
                G333Messages
                        .showWarning("Permissions3 or PermissionsBukkit is allready detected!");
                return;
            } else {
                Plugin permissions3Plugin = plugin.getServer().getPluginManager()
                        .getPlugin("Permissions");
                Plugin permissionsexPlugin = plugin.getServer().getPluginManager()
                        .getPlugin("PermissionsEx");
                if (permissions3Plugin != null) {
                    permission3Handler = ((Permissions) permissions3Plugin).getHandler();
                    permissions3 = true;
                    G333Messages
                            .showInfo("Permissions3/SuperpermBridge is detected. "
                                    + ((Permissions) permissions3Plugin)
                                            .getDescription().getFullName());
                } else if (permissionsexPlugin != null) {
                    G333Messages.showInfo("PermissionsEx is detected.");
                    permissionsex = true;
                } else {
                    G333Messages
                             .showInfo("Permissions3/PermissionsEx system not detected, defaulting to SuperPerms");
                }
            }
        }
    
        // Test if the player has permissions to do the action
        public static boolean hasPerm(CommandSender sender, String label) {
    
            // How to hook into SuperPerms
            // Basic Permission Check
            // In this example (MyPlugin) is meant to represent the name of your
            // plugin,
            // for example... iConomy would look like:
            // Player player = (Player) sender;
            // if (player.hasPermission("a.custom.node") {
            // return true;
            // }
    
            // How to hook into Permissions
            // Basic Permission Check
            // In this example (MyPlugin) is meant to represent the name of your
            // plugin,
            // for example... iConomy would look like:
            // if (!(MyPlugin).permissionHandler.has(player, "a.custom.node")) {
            // return;
            // }
            // Checking if a user belongs to a group
            // if (!(MyPlugin).permissionHandler.inGroup(world, name, groupName)) {
            // return;
            // }
    
            // Permission check
            // if(permissions.has(player, "yourplugin.permission")){
            // yay!
            // } else {
            // houston, we have a problems :)
            // }
    
            // if (sender.isOp())
            // return true;
    
            Player p = (Player) sender;
            if (permissions3) {
                // Permissions3 or SuperpermBridge
                if (permission3Handler.has(p, PERMISSION_NODE + label)) {
                    // if (debugmode("Debug.Permissions"))
                    // p.sendMessage(ChatColor.GREEN
                    // + "Permissions3 You have permission to: "
                    // + PERMISSION_NODE + label);
                } else {
                    // if (debugmode("Debug.Permissions"))
                    // p.sendMessage(ChatColor.BLUE
                    // + "Permission3: You dont have permission to: "
                    // + PERMISSION_NODE + label);
                }
                return (permission3Handler.has(p, PERMISSION_NODE + label));
            } else if (permissionsex) {
                PermissionManager permissionsexManager = PermissionsEx
                        .getPermissionManager();
                if (permissionsexManager.has(p, PERMISSION_NODE.toLowerCase() + label.toLowerCase())) {
                    //G333Messages.showInfo("Permission node:"+PERMISSION_NODE+label+" TRUE");
                    return true;
                } else {
                    //G333Messages.showInfo("Permission node:"+PERMISSION_NODE+label+" FALSE");
                    return false;
                }
            } else {
                // Default to SuperPerms
                 return (p.hasPermission(PERMISSION_NODE + label));
            }
        }
    }
    very easy. ^^
     
  5. Offline

    Gabriel333

    Ahh you looked at my Source ;) It was outdated - Im sorry :oops: - but I get the point, so I will clean up the code (once more :rolleyes: )
     
  6. Offline

    feildmaster

    Have fun. If you include an updated source next time, would you mind if I helped clean it up?

    (I'm super bored... so I'm offering. ^^)
     
  7. Offline

    Gabriel333

    I would rather get some help with the new GUI system. I want to make Buttons next to the inventory window. "Sort","Stack" & "Close". And I need to learn to make and input-textfield. I have tried this but it throughs an error at last line??? What am I doing wrong?

    Code:
    
    // this one works
    sortButton = new GenericButton("Sort");
    saveButton.setX(getMarginLeft()).setY(getMarginBottom()-10).setWidth(40).setHeight(20);
    saveButton.setX(getMarginLeft()).setY(getMarginBottom()-10).setWidth(40).setHeight(20);
    sPlayer.sendMessage("Sortbutton is:" + sortButton);
    screen.attachWidget(sortButton);
    
    // this one fails at last line???
    inputfield2 = new GenericTextField();
    inputfield2.setX(getMarginLeft()+15).setY(getMarginTop()+80).setWidth(background.getWidth()-20).setHeight(20);
    inputfield2.setMaximumCharacters(20);
    inputfield2.setText(sPlayer.getName());
    screen.attachWidget(inputfield2);
    
    
    Does " return (p.hasPermission(PERMISSION_NODE + label));" Not through an error in the console if "PermissionsBukkit.jar" does not exist? Or is p.hasPermission(...) an bukkit command?

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

    feildmaster

    It's a bukkit command. ^^

    for help with the gui: (1- I don't know spout very well yet but)

    The one that works (you're setting the area's of a different button)

    I'll look into spout sometime...
     
  9. Offline

    Gabriel333

    I made copy and paste from another plugin im planning, and changed save to sort, but I forgot the two lines :)

    I thought it was a PermissionsBukkit command, I change the code then.
     
  10. Offline

    cheerie

    i've been using this plugin just fine for a few days now but earlier today it just stopped, it says you don't have proper permissions to use that command.(sortinventory.use)

    i do not have any permissions set, but it was working fine without them till now.
     
  11. Offline

    feildmaster

    Gabriel accidentally put "use" as an "op" command. (Even after asking me how to default it to everyone even.)

    You can fix this yourself by opening the jar with 7zip, or winrar:
    - Open plugin.yml
    - find "sortinventory.use"
    - change "op" to "true"

    (server has to be off to change it)
     
  12. Offline

    lipe123

    Looks like its all working now!

    Can we turn off:
    SortInventory: END of EAST
    SortInventory: END of EAST
    SortInventory: END of EAST
    SortInventory: END of EAST
    SortInventory: END of EAST
    SortInventory: END of EAST
    SortInventory: END of EAST
    SortInventory: END of EAST
    SortInventory: END of SOUTH
    SortInventory: END of EAST
    SortInventory: END of EAST
    SortInventory: Target is:CHEST
    SortInventory: END of SOUTH
     
  13. Offline

    cheerie

    thanks it didn't help i can wait till it's fixed.
     
  14. Offline

    Gabriel333

    As fieldmaster said, I made an error when i changed my permission system. It should be fixed in version 1.3

    Show Spoiler

    Code:
    name: SortInventory
    main: dk.gabriel333.SortInventory.SortInventory
    version: 1.3
    author: gabriel333
    website: https://github.com/Gabriel333
    description: Use /sort to sort you personal inventory or the chest
    depend: [Spout]
    commands:
        sort:
            description: Rebuild all item stack in your inventory.
            usage: /sort
            aliases: /sortinventory
            permission: sortinventory.use
    permissions:
        sortinventory.use:
            default: true
        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


    I should be fixed, in version 1.3 which you find at my download link. Tell me if it does not work!


    Removed in release 1.3.1

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

    cheerie

    it does work again thank you =]
     
  16. Offline

    BrassDoll

    This mod is a favorite of the players on my small server, really, an amazing job indeed.

    Using PermissionsBukkit, with permissions for stacking tools/food/etc to false. It still stacks buckets, signs, and cookies. Is this intentional or am I doing something wrong?

    Edit: Cookies to 64, I should say.
     
  17. Offline

    Gabriel333

    Well there are many opinions about what should be stack. I have made the 5 groups to let the serveradmins decide which groups must be stacked. :)

    I guess Im missing cookies in my "food test method". If you tell me what itemnumber cookies have, then I will make a quick fix. Cookies are definitely Food :)

    But what about Buckets? or fishing rods, or???

    I think I will make it configurable, but this will take some time :)
     
  18. Offline

    BrassDoll

    Yea, the permissions system is great. That is working well, beyond the cookies/bucket/etc

    Cookies = 357. by default they stack to a max of 8

    With buckets (buckets stacking with bucket(325), lavabucket with lavabucket(327), waterbucket with waterbucket(326)) if the user allows them to stack and then proceeds to use one (within its stack) the item disappears and doesn't apply use.

    I'm assuming the bucket thing isn't intended since, again, it does destroy the bucket on use. It's great for storage, but I'd imagine most players run the sorting on their inventory too

    Fishing Rods don't stack up though~
     
  19. Offline

    max96at

    Could you please add that if you use up a iron sword and have one more in your inventory it gets placed in the same slot? If possible do the same with food or stacks of blocks.
     
  20. Offline

    Gabriel333

    Food and swords should be stacked, except in slot 0-8 (the lowest row) because they must be alone in the slot if you want to use the sword or eat the food. Blocks should be stacked in slot 0-8. anyways.
     
  21. Offline

    max96at

    @Gabriel333
    I mean like in the Inventory tweaks mod


    Or isn't that possible with spout's/bukkit's API
     
  22. Offline

    Gabriel333

    Ahhh now I understand, that is an great idea. I will put it on my "to do" list, but I cant promise that I can make it. I think it is possible!
     
  23. Offline

    gameswereus

    Thanks for adding the Spout backpack! I think I was the one that suggested it :p
     
    Gabriel333 likes this.
  24. Offline

    Gabriel333

    Thank you for the feed back! You should thank @NeatMonster too, because he cooperated with me, making a API for me!

    Im ready to do integration to other inventories too, if a user ask for it and the developer of the other plugins wants to cooperate. I cant do it without help from the other plugin developer, because needs to make an API to do it.
     
    gameswereus likes this.
  25. Offline

    Sa_KE

    Can this plugin stack food in 0-8 so you can eat continuously?
     
  26. Offline

    Gabriel333

    No I cant make that, BUT I have planed to make an feature, where the plugin moves food from the inventory down to 0-8 if you eat that kind of food, and if a tool is "used up" and you have it in the inventory i should be moved down. If I have time I will look at it tonight.
     
  27. Offline

    Sa_KE

    Ahh goody thats even better then having stacked food in 0-8. Amazing mod if it becomes that way <3!
     
  28. Offline

    Emiya Shirou

    Is it possible to set middle mouse button for sorting? Also won't "s" button collide in Minecraft? I mean Walking is on W,S,A,D...
     
  29. Offline

    Gabriel333

    Yes teoretically it should be, but Im not sure ii think it is an good idea. Using S does not conflict because you dont use S to walk, when the inventory is open. So no problem. :) If you want to use another key, you can change it in config.yml.

    Im working on a GUI for my plugin in, a graphical menu where you can do stuff to your inventory, but Spout does not let me do everything i want, so at the moment i have some problems making it work :-(
     
  30. Offline

    Emiya Shirou

    I see... but still S is bind my minecraft as walking key so it should still cause some minor things even if you don't see them. Is the plugin functionality disabled when inventory or chest isn't opened? Cuss that's my concern if it was enabled and 2 things would be done at the same time... (if you know what I mean).

    PS: I would love to bind that key to middle mouse button, you know how xD? For now I've set it on R as... hmm... i dunno....... Reassign?

    PS2: btw. Is the memory impact on server big while using this plugin or it doesn't eat anything? (I'm asking because My serv. got only 512mb of ram :/ )
     
  31. Offline

    Gabriel333

    1) About the KEY_S: I dont think there is any conflict! I of cause use the plugin myself and I dont have any problems. Have you seen a conflict?

    2) It is on my "to do list", but at the moment I have used my time on the GUI menu. So with time I think I will make the Sort function on the middle mouse button. So server admins can decide.

    3) I dont think the plugin uses much memory, I havn't got any complains, but teoretically you will get some CPU load if all your users using the sort feature at the SAME time. I dont think that will happen and I have optimized the sort algorithm so it is fast.
     

Share This Page