Knapsack Interface 101

Knapsack Interface and Linkage


Basic Understanding:

Knapsack Interface provides players the ability to interface their Knapsacks with storage containers. Interfacing a Knapsack with a container means the player will be able to see and use the inventory stored in the Knapsack directly with that containers inventory for easy transfer of items to and from chests, etc...

Knapsack Interfacing is initiated when a Knapsack Link is created on a sign, chest, action and/or custom action block.
Example:

  • A custom action block you have on the server that sells bread. After creating the shop for this block, you would then create a Knapsack Link to this block(shop) with the Knapsack Spy/Linking Tool.

  • Another example would be if a player (factions maybe) has a shared chest(single or double) the player can either create a Knapsack Link to this chest which allows all shared players to use(right-click) a Knapsack on said chest and they will be forced into SackMode to interface with said chest.

    • Another way in this same example would be any player wanting to interface a Knapsack with said shared chest, would enter SackMode via "/ks [config-sackmode-command]" and then use the Knapsack on the chest.*

When creating links for double chests, you do not have to create two links, you can, but you don't have to. In fact, by creating a link on one side of a double chest and leaving the other side un-linked, you virtually create a multi-mode chest whereby you can use one side to interface that chest to a Knapsacks inventory and the other side just to quickly access the chests inventory with the players inventory.


Having said all that, as a player or an admin/owner for a server you can create Knapsack Links to your shops, chests, private inventories (chest, etc...) that will allow other players to interface their Knapsacks with. Not every player can create Knapsack Links and the owner you don't have to give players the permission to create links to use Knapsack Links.

  • If you strictly want to allow players to interface your servers Knapsack Links provide the player with permission node (knapsacks.int.player.use).

  • If you would like to allow your players to enter SackMode allowing them to interface their Knapsacks with their own chests and whatnot, provide them with the permissions node (knapsacks.int.player.mode). This is a manual SackMode command and the name of the command is configured by you in the configuration or you can leave it as the default "sackmode".

    In most cases you will provide players with both permission nodes to allow them to interface Knapsacks with your server Knapsack Links as well as to provide them the ability to interface their own chests, etc.. with their Knapsacks.

  • Provide any player the ability to create their own Knapsack Links with permission node (knapsacks.int.player.link).

    • This node allows a player to spy and link other Knapsack Links on the server. Regardless of a player having the ".link" permission node, they can not edit and/or remove other players or server Knapsack Links unless they were the creator and/or manager of said Knapsack Link.

      If a player does not have the ".link" permission they will not have access to any of the (/ks int) commands/help pages. This is normal, as there is nothing the player needs permission to when not managing links.

See examples and illustrations at the bottom for some clarification on what takes place with your inventories (Player and Knapsack) when Interfacing is initiated into SackMode.**


When a player Interfaces and enters SackMode, Knapsack Inventory is transferred from the Knapsack to the Players Inventory. Depending on the size of the Knapsack interfaced with, the Players Inventory will only hold up to that number of inventory slots, up to 36 total slots, equal to that of Player Inventory. If a player interfaces a Knapsack larger that what Player Inventory can hold, all slots that could not be transferred are still accessible by opening the Knapsack.



* If the Knapsack you are interfacing with is part of your Auto-Fills fill-chain, that Knapsack (fill) will temporarily be turned off until you exit SackMode Interfacing. This is to ensure any items that are picked up during your SackMode Interfaced are properly stored. Because there is a lot of inventory re-positioning during initial SackMode entry, from your Knapsack to your Player Inventory, and fillers for your Knapsack as well as fillers Player Inventory depending on Knapsack Interface sizes. Sound complicated? It's really not!


When Knapsacks are stashed inside other Knapsacks, all Knapsacks are forced to the last slots of the Knapsacks inventory when you close it. Regardless of where a player places a stashed Knapsack inside another Knapsack, it will always re-positioned to the last slots of that Knapsack. Additionally, when Interfacing a Knapsack that contains stashed Knapsacks, the players inventory slots, depending on the size of the interfaced Knapsack, will be filled with a Stash Filler, indicating that the slot is not available and is reserved for a Stashed Knapsack.

If you Interface with a size 45 or 54 Knapsack, and you have Stashed Knapsacks, your stashed Knapsacks are in the last slots of the Knapsack you are interfaced with. Use your Knapsack or issue (/ks [knapsackId]) or right click the Knapsack in Player Inventory View to open that Knapsack and access the Stashed Knapsack. shoooo that was alot......



Configuration

Config. Section >> 'Config.KnapsackInterface'

  • KnapsackInterface:
    • Enabled: true
    • LogAdminOverrides: true
    • ListPageLimit: 10
    • Tool: 369
    • ToolNotInHand: '&cPut the &f%tool%&c in your hand first!'
    • ToolNotHolding: '&cSack Link modes turned &7Off&c, your not holding the %tool%'
    • Command: 'sackmode'
    • UnavailableFiller:
      • Item: STAINED_GLASS_PANE
      • SubId: 14
      • DisplayName: 'SLOT IS NOT AVAILABLE'
      • Lore:
        • Player:
        • - 'UnAvailable SackMode Slots are filled in Red!'
        • - 'Available slots are left of the Knapsack. Right-click the'
        • - 'Knapsack to manage available slots in this Knapsack!'
        • - '%knapsack% %(sackname)% is size: %size%'
        • Knapsack:
        • - 'Your holding this item in your inventory now'
        • - 'You can not modify this slot or any other slot'
        • - 'That is colored red.'
        • - '%knapsack% %(sackname)% is size: %size%'
        • StashedSack:
        • - 'Stashed %knapsack% %(sackname)% of size %size%'
        • - 'Stashed Knapsacks are not available while'
        • - 'using a Knapsack in SackMode!'
        • - ''
      • Messaging:
        • Enabled: true
        • ModeOnMsg: '&2Knapsack &f%mode% &2mode is &fOn&2. Punch block(s) to %mode%'
        • ModeOffMsg: '&eKnapsack &f%mode% &eturned &fOff'
        • SackModeOn: '&b%knapsack% &3in Sack Mode. Right-Click to transact, Punch to exit Sack Mode'
        • SackModeTransact: '&3Transaction performed with &b%knapsack%'
        • SackModeOff: '&b%knapsack% &3is no longer in Sack Mode.'
      • Plugins:
      • - ShowcaseStandAlone
      • - SignShop
      • - ChestShop

Key configuration details

'Enabled' - turn Knapsack Interfacing on or Off
'LogAdminOverrides' - Setting this on will log all Knapsack Links modified by players with (knapsacks.int.*) permissions
'ListPageLimit' - Set the number of Knapsack Links to display per page when using (/ks list)
'Tool' - The Official Knapsack Spy and Linking Tool(default is Blaze Rod)
'Command' - This is the manual command player will need to use when they do not have permisison to use Knapsacks with links
'UnavailableFiller.Item' - This is the filler item that is placed into unavailable slots in player and knapsack inventories(default is 160:14)
'UnavailableFiller.SubId - This is the filler items durability or subid. If there is none this needs to be zero (0)
'Plugins' - Add additional plugins that you may need enhanced support for when using Knapsack Links with. Before adding any, try them first!


NOTE: You DO NOT need to add Essentials for Essentials signs.


Commands

Base command: ' /ks int '

COMMANDDESCRIPTIONREQUIRED NODE
/ks intKnapsack Link Commands and Usageknapsacks.int.link
/ks int linkEnter/Exit Link Modeknapsacks.int.link
/ks int spyEnter/Exit Spy Modeknapsacks.int.link
(*)/ks int listList of all Knapsack Links w/locations,...knapsacks.int.link
/ks int overrideAllow admin to override non-managed link for removalknapsacks.int.*
/ks int port [id] (player) (-loc)Port yourself or another player to a Knapsack Linkknapsacks.int.port, knapsacks.int.port.loc, knapsacks.int.port.loc.other
(*)/ks int set [linkId] [linkType]Set the "Type" for a Knapsack Linkknapsacks.int.link
(*)/ks int transfer [linkId] [player]Transfer Knapsack Link to another Playerknapsacks.int.link

(*) has sub commands. Use that base command for help on the command
NOTE: Only the Manager, Creator and/or Admin can modify Knapsack Links, including the removal of, changing their Link Type and transferring a link to other players.


Permissions

PERMISSION NODEGRANTS PERMISSION TO
knapsacks.int.*Grants Knapsack Link Admin Rights
knapsacks.int.player.useAllows a player to Use Knapsacks with Knapsack Links
knapsacks.int.player.modeAllows a player to manually enter SadkMode
knapsacks.int.player.linkAllows a player to View, Create, Edit and Manage Knapsack Links
knapsacks.int.player.link.otherAllows a player to View, Create, Edit and Manage Another players Link
knapsacks.int.portAllows a player to port themselves to a Knapsack Link
knapsacks.int.port.locAllows a player to retrieve the location of a Knapsack Link
knapsacks.int.port.loc.otherAllows a player to port another player or to another players Knapsack Link


Examples/Illustrations

Spying a Knapsack Link: (non-owner)
https://dl.dropboxusercontent.com/u/103932311/knapsacks/bukkit-pages/ks_interface_links/spy_link1.png

Spying a Knapsack Link: (owner)
https://dl.dropboxusercontent.com/u/103932311/knapsacks/bukkit-pages/ks_interface_links/spy_link_owner.png

Spying a Knapsack Link: (double-chest, one-side linked, as creator)
https://dl.dropboxusercontent.com/u/103932311/knapsacks/bukkit-pages/ks_interface_links/spy_link_double_chest.png

Spying a Knapsack Link: (creator)
https://dl.dropboxusercontent.com/u/103932311/knapsacks/bukkit-pages/ks_interface_links/spy_link_creator.png

Using Knapsack on Link (entering sackmode)
https://dl.dropboxusercontent.com/u/103932311/knapsacks/bukkit-pages/ks_interface_links/sackmode_example_1-insackmode.png

Using Knapsack on Link (transacted in sackmode)
https://dl.dropboxusercontent.com/u/103932311/knapsacks/bukkit-pages/ks_interface_links/sackmode_example_1-insackmode-transacted.png

Using Knapsack on Link (transacted & Player Inventory view)
https://dl.dropboxusercontent.com/u/103932311/knapsacks/bukkit-pages/ks_interface_links/sackmode_example_1-insackmode-transacted-player-knapsack_inv-open.png

Using Knapsack on Link (transacted & Knapsack Inventory view)
https://dl.dropboxusercontent.com/u/103932311/knapsacks/bukkit-pages/ks_interface_links/sackmode_example_1-insackmode-transacted-player-knapsack-open.png

Player Inventory view of Knapsack in-use(slots not available views)
https://dl.dropboxusercontent.com/u/103932311/knapsacks/bukkit-pages/ks_interface_links/sackmode_example_1-insackmode-transacted-player-knapsack_inv-open-no_slot.png

Player Knapsack Inventory view (slot views)
https://dl.dropboxusercontent.com/u/103932311/knapsacks/bukkit-pages/ks_interface_links/sackmode_example_1-insackmode-transacted-player-knapsack-open-no_slot.png

Using Knapsack on Double Chest (one side linked)
https://dl.dropboxusercontent.com/u/103932311/knapsacks/bukkit-pages/ks_interface_links/sackmode_example_1-insackmode-dblchest.png

Using Knapsack on Double Chest (one side linked - inventory view)
https://dl.dropboxusercontent.com/u/103932311/knapsacks/bukkit-pages/ks_interface_links/sackmode_example_1-insackmode-dblchest-chestopen.png