Auto Inventory

Discussion in 'Archived: Plugin Requests' started by FrostyWolf, Aug 23, 2012.

  1. Offline

    FrostyWolf

    This plugin would do the following:

    Replace currently used item in the quickbar with same or like item from your inventory.

    Example:

    As you can see in the picture bellow, I am about to use up the last to dirt in my inventory:
    [​IMG]

    When that happens, the plugin will look through my current inventory, find the next stack of dirt, and move it down into the now empty slot, like so:
    [​IMG]

    Configuration:
    Code:
    inventory_search: true //When false, plugin will not automatically search in your inventory to replace things on your quick bar
    grass_equal_dirt: true  //When true, if you run out of dirt blocks entirely, the plugin will replace it with grass, if you have any, or vice-versa.
    food_for_food: true //When true, if you run out of a type of food, plug in will replace it with any other food in your inventory.
    only_same_enchant: false //When set to true, the plugin will ONLY replace a tool if you have one in your inventory with the exact same enchants.
    only_same_material: false //When set to true, the plugin will ONLY replace a tool if you have one in your inventory made of the same material.
    silk_touch_warning: false //When set to true, player will be warned if a silk touch tool breaks and is replaced with a non-silk touch tool.
    
    If no matches are found to replace with, inventory column is shifted down.

    Example:

    Oh no! I'm about to run out of dirt again, but this time I have no dirt (or grass) in my inventory!
    [​IMG]

    Since no matching blocks are found, the entire column shifts downward to fill the slot like so:
    [​IMG]

    Configuration:
    Code:
    shift_column_down: true //When set to false, columns will not be shifted.
    shift_on_inventory_close: false //When set to true, plugin will shift inventory downward when ever you close your inventory.
    
    Notes:
    When searching for a matching item to put into a empty slot on the quick bar, plugin should always search up the column above the recently expended item first, then the rest of the inventory. This may not matter for building materials, but can be very important for tools. For the user, they can easy set the order for their tools to load into their quick bar by simply stacking them in the order they want in their inventory.

    As long as only_same_material is set to false, the plugin should search for a new tool in the following way:

    Search for the same tool made from the same material.
    If one can not be found, search for a tool made from the material bellow that one, etc (for instance, if broken tool was a iron pickaxe, and the player has no more iron pickaxes, look for a stone pickaxe next, then a wood one).
    If one can still not be found, look for a tool made from the material above that one (for instance, if a broken tool was a iron pickaxe, and no stone or wood ones can be found, look for a diamond one next.)

    As long as only_same_enchant is set to false, the plugin should search for a new tool in the following way:
    First search for a tool with the exact same enchants and levels.
    Then search for a tool with the exact same enchants but different levels.
    If the tool had Looting, Fortune, Infinity or Silk Touch, replace it with same tool with the same enchant it has if one can be found.

    The above rules, while seemingly complicated at first, should ensure that tools are being replaced in a some-what logical way upon them breaking. Of course, the default behaviour if nothing matches is always shift the column down (as long as shift_column_down is set to true of course.)

    The example config settings listed above are the global defaults. Each player should be able to edit his settings via in game commands, if they wanted.
     
  2. Offline

    CarPet

    This is a client mod... Not a plugin
     

Share This Page