[INACTIVE][[MECH] AutoTool v1.4 - Never dig through your inventory for tools again [1337]

Discussion in 'Inactive/Unsupported Plugins' started by marinating, Jun 9, 2011.

  1. Offline

    marinating

    The plugin has been taken over by joshua katz.
    Grab his version on bukkitdev!

    AutoTool - The smart, convenient tool switcher.
    Version: v1.4

    AutoTool was developed when I became tired of constantly switching between shovels and pickaxes while mining. With this plugin, simply type /autotool or /at followed by on or off to toggle. A config file is provided that lets you specify which types of items you want to set to shovels, pickaxes, or axes- the file comes default with the basic items like ores, stones, logs, sand, and the like. If a player has AutoTool on and hits a log, for example, while holding a pickaxe in their hand, AutoTool will search their inventory for an axe. If it finds one, it immediately swaps the positions of the pickaxe and axe so the player can chop some wood without having to rearrange their items. This will hopefully be a huge headache-saver for some people, namely our Yogscast adventuring duo *cough cough*.
    Placing a blocks while in AutoTool mode will disable it, because strange duplication glitches may happen (until Bukkit comes up with a suitable replacement for player.updateInventory()).
    Plans for the future include AutoSword when damaged by a monster or other player, and AutoFood when your health runs low.
    Permissions node: 'auto.tool'




    Features
    • Config file lets you manually specify which items are assigned to what tools.
    • Never waste time searching your inventory for pickaxes, shovels, and axes!
    • Toggle on and off with simple commands- /at, /at on, /at off
    • Automatically pulls up the next tool in your inventory if the one you're using breaks
    Download

    Changelog
    Version 0.9
    • Release
    Version 1.0
    • Added permissions - 'auto.tool'
    Version 1.1
    • Bugfix for null pointer
    Version 1.2
    • Removed spam, made it smarter (placing blocks will not go trigger a tool switch, but left clicking will)
    • No longer switches out when you're holding a sword
    • Added SuperPerms support
    Version 1.3
    • Added more items to default pickaxe items
    • Added a config option that makes autotool on by default
    Version 1.4
    • Fixed all the bugs!
     
    Xerial, JonasD, maetthew and 2 others like this.
  2. Offline

    chronopolis

    Excellent
     
  3. Offline

    kahlilnc

    This is neat
     
  4. Offline

    marinating

    Updated version. Does this already exist or something?
     
  5. Offline

    TerraPlay

    If you add permissions, this will be amazing. Really need it.
     
  6. Offline

    sintri

    backpack compatible? Though if Afforess is doing a rewrite, might be a pointless question.
     
  7. Offline

    marinating

    Backpack is inactive or undergoing reconstruction, so I'll look into compatibility when it's back and stable.
    @TerraPlay Updated to 1.0 and added Permissions support. The node is "auto.tool".
     
  8. Offline

    oliverw92

    Excellent idea!
     
  9. Offline

    TerraPlay

    Amazing! Thanks bro :3
     
  10. Hmmm, I loaded this live with a full /reload, and got endlessly spammed with:

    Code:
    17:43:42 [SEVERE] Could not pass event PLAYER_INTERACT to AutoTool
    java.lang.NullPointerException
            at com.WildAmazing.marinating.AutoTool.AutoToolPlayerListener.onPlayerInteract(AutoToolPlayerListener.java:33)
            at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:306)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:166)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:64)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:455)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:223)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  11. Offline

    marinating

    @Joy I've tested this myself with reloading and it works perfectly fine... I'll go through the code again and look for sources of error.

    Released version 1.1 that hopefully fixes any more errors that people may be having.

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

    Liquidd46

    Could you eventually make it so that if you're placing stone or glass for example and you run out then it will search your inventory for the next equivalent item and place it in your hotbar.
     
  13. Offline

    marinating

    AutoItems? Sounds possible, I'll do it later today.
     
  14. Offline

    Liquidd46

    Awesome, thanks !
     
  15. Offline

    Snyke

    Love it! Could you add an option to turn the messages off though, cus sometimes it spams you quite a bit :p
    Also: If you can auto disable autotool when selecting a block item, can you also auto enable it when selecting a tool?
    Then you would use /at on for enabling it once, if you want to use it.
     
  16. Offline

    chriskevini

    It only works with pickaxe for me, doesnt switch to axe or shovel, help
    thanks :D
     
  17. Offline

    marinating

    Did you do /at on? And can you provide a screenshot of what's happening?
     
  18. Offline

    chriskevini

    thanks for the quick response. :D

    I did do /at on, but it still wont switch to an axe when I hit logs.
    Im using b860 btw
    thanks again

    Edit:
    A screenshot?
     
  19. Offline

    marinating

    Are you sure you have a wood/stone/iron/diamond axe in your inventory? A video would help a lot if you could make one somehow.
     
  20. Offline

    chriskevini

    I do have a stone axe on me, but its just not working, and I cant make a video, sorry :(
     
  21. Errors gone!

    Already exists: http://forums.bukkit.org/threads/me...item-slots-with-item-from-inventory-766.4656/

    Although it has a pretty big bug atm.

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

    sifotes

    Great idea, thanks!
     
  23. Offline

    Demono

    I second this request, I don't need a message everytime it switches tools... otherwise this plugin works great!
     
  24. Offline

    marinating

    Updated to version 1.2. Spam is gone, and auto tool enables itself when you select any tool. Also enables itself (assuming you did /at on) when you left click a block, and disables when you right click.
     
  25. Offline

    chriskevini

    I worked out my problem! It turns out I (somehow) messed up the config file. I deleted it and got a fresh config and now it works. thanks anyway.

    EDIT:
    Could you please add your plugin to CraftbukkitToDate THX
     
  26. Offline

    grinch843

    Great plugin! Can you add a config option to have it on by default?

    Thanks,
    Grinch...
     
  27. Offline

    Snyke

    Totally awesome now!
     
  28. Offline

    TheTennessee

    Is there any way to make it so that it only switches IF you have a tool already in hand, or your hand is empty? I keep hitting stone and getting a pickaxe with a sword in my hand. Seems like that's going to get me killed one of these days. Also, any way to see the tiers that it prefers? I would prefer it to use my stone pickaxe over my gold pickaxe. I only use gold for SOME instances.
     
  29. Offline

    marinating

    Turn it off if you don't want the effect. Also, rearranging the order of items in your inventory will make it grab a different one.
     
  30. Offline

    Snipe76

    suggestion:

    upgrade the plugin by adding that the plugin will take the most damaged tool ( for the right job ) in the inventory instead items order.
     

Share This Page