A Bukkit plugin that automatically switches the tool in a players hand depending on what block/entity that player interacts with. See below for details on tool swapping.
Installing & Upgrading
- Download ToolSwap.zip
- Unzip ToolSwap.zip.
- Drag ToolSwap.jar into your “craftbukkit/plugins” folder ? replace ToolSwap.jar when upgrading.
ToolSwap may be configured from the default settings.
- Turn ToolSwap on or off by default
- Turn torch swapping on or off
- Allow ToolSwap to swap to sword when a player hits another player.
- Change which blocks/mobs will activate ToolSwap.
- Navigate to the “config.yml” file in the “craftbukkit/plugins/ToolSwap” folder. If the file or folder is not present, reload the craftbukkit server.
- Only use space characters in the config.yml file. Tabs will break it!
- Blocks must be specified by their material name.
- Mobs must be specified by their entity type.
- Craftbukkit must be reloaded before any changes to the config.yml file can take place.
ToolSwap is very simple to use!
- /toolswap [on/off] ? this turns ToolSwap on or off.
- /toolswap [player] [on/off] ? this turns ToolSwap on or off for the specified player.
Please note that ToolSwap is disabled by default.
- toolswap.* ? enables all permissions.
- toolswap.use ? ToolSwap may be used by this player. Note: ToolSwap must be turned on first (either by using a command or by enabling “on-by-default” in config.yml).
- toolswap.on ? enables use of “/toolswap on” command.
- toolswap.off ? enables use of “/toolswap off” command.
- toolswap.player.on ? enables use of “/toolswap [player] on” command.
- toolswap.player.off ? enables use of “/toolswap [player] off” command.
- ToolSwap ? When a player left-clicks on a block that can be mined, ToolSwap will determine if the correct tool exists in that player’s inventory. If so, the item in-hand will be swapped with the correct tool in that player’s inventory.
- Auto-Torch ? When a player has a pickaxe or shovel in-hand, and right-clicks a block that a torch can be placed on, ToolSwap will determine if torches are in that player’s inventory. If so, the item in-hand will be switched with the torches in that player’s inventory.
- Fighting ? When a player left-clicks on an enemy mob, ToolSwap will determine if a sword is in that player’s inventory. If so, the item in-hand will be swapped with a sword.
- Tool Breaking ? If a tool breaks while ToolSwap is on, ToolSwap will swap to the next available correct tool in that player’s inventory.
Let’s say that a player clicks on a cobblestone block, and has multiple pickaxes in their inventory, how does ToolSwap determine what pickaxe to switch to?
When swapping, ToolSwap will find the first correct tool in that player’s inventory:
Order of First to Last
- The ‘HotBar” from left to right.
- The rest of the player’s inventory from left to right, top to bottom.
This means that the left-most slot in the “HotBar”, is the first item in a player’s inventory. The item in right-most slot on the bottom row of a player’s inventory is the last item in a player’s inventory.
- When a player has a bow in-hand, and that player clicks on a block that can be mined, ToolSwap will not swap to the correct tool for mining. However, if the player has a bow in-hand, and that player clicks on an enemy mob, ToolSwap will swap to the first sword in that player’s inventory.
- If ToolSwap swaps an item in a player’s “HotBar,” instead of swapping the items in the bar, ToolSwap will change the selected slot of the correct item. This makes players that are particular about their “HotBar” inventory quite happy.
- Some ores/blocks require a certain level of pickaxe to mine, ToolSwap will only swap to the required level (or higher) pickaxe needed to mine that ore/block.
Configurable Preferences ? set which tools to use on which blocks.
- Per-player Preferences ? player’s can set the tool in-hand as the preferred tool to switch to, when mining specific ores/blocks.
Author: silvermmonkey A.K.A. mmonkey
Testers: Desaxt01, GrahamCracker4m, HuskerMath and e_dick.
- v1.2 ? Updated for Bukkit 1.7.2!
- v1.1 ? Added permissions, configurable settings, and more commands!
- v1.0 ? Initial release.
ToolSwap Plugin 1.7.2 Download Links