Inactive [EDIT] InstaBreak v2.0 - Break blocks instantly! [1060]

Discussion in 'Inactive/Unsupported Plugins' started by R3ality, Apr 5, 2011.

  1. Offline

    R3ality

    InstaBreak - Break blocks instantly!
    Version: v2.0 (CraftBukkit build #1060)

    This plugin allows players to break blocks with just one strike using an universal InstaBreak tool. It was initially created as a simple, lightweight alternative to the superpickaxe included in the fantastic WorldEdit plugin.

    Current features include support for multi-world permissions (including nether) by the Permissions plugin (usage is optional) and a variety of customizable options and in-game commands (or option to disable any customization if you just want the plain-simple core functionality :)).

    Features:

    • Save inventory slots! - No need to carry multiple tools, the InstaBreak tool works on all* blocks
    • Save time! - Break any* block or placed item with one strike!
    • Break blocks from far away (ranged breaking)!
    • Support for the Permissions plugin (tested with 3.1.5b and 2.7.4, usage is optional)
      • Multi-world permissions support (including nether)!
    • Support for protection plugins (tested with WorldGuard 5.0-dev and EssentialsProtect 2.3.3)
    • Allow breaking of bedrock (also known as Adminium) blocks*
    • In-game commands
      • Change the InstaBreak tool to ANY type of block or item!
      • Toggle InstaBreak mode for ANY player in the server!
      • Toggle block drops upon breaking!
    • Uses a configuration file to persistantly keep settings.
      • Option to turn off commands and permission usage completely (leaving just core functionality).
      • Option to toggle if block breaking is counted in the "Times Mined" of player Statistics.
    * - Except the bottom-most layer of bedrock (breaking that has been intentionally disabled)
    Note: This plugin doesn't affect actions against other entities in any way (players and NPC-s)

    Download: [​IMG] InstaBreak v2.0 (.jar only)

    Installation:

    • Download and place "InstaBreak.jar" file into the "plugin" directory of the server.
    • Start/restart the server to have the plugin loaded (or use a plugin manager)
    • (optional) Make changes in the configuration file
      Read the "Configuration File" section below for details..
    • (if using Permissions) Grant desired permission nodes to users or groups
      Read the "Permissions" section below for details..
    Commands:
    Permissions / Configuration file:
    Show permissions and configuration info (open)
    Permissions:

    Permissions plugin usage is optional. If you are not using it the plugin will default to using the regular "ops.txt" (all commands will be enabled for all ops). If you are using permissions but you do not want it to apply to this plugin there is an option to make the plugin "static" via the configuration file (read below)

    The plugin utilizes the following permission nodes:

    instabreak.toggle - allow player to toggle InstaBreak mode for themselves
    Commands enabled: /ib + /ib info

    instabreak.force - allow player to toggle InstaBreak mode for other players
    Commands enabled: /ib list + /ib enable + /ib disable + (all of the above)

    instabreak.config - allow player to make InstaBreak configuration changes
    Commands enabled: /ib tool + /ib drop + (all of the above)

    Special additional permission:

    instabreak.bedrock - allow player to break bedrock blocks.
    instabreak.ranged - allow player to break blocks at a distance.
    Note: Player still needs to be in InstaBreak mode for these to apply.

    _____________________________________________________

    Configuration file:

    In case the configuration file doesn't exist it is created automatically with default values when the plugin is loaded. This means you probably don't need to worry about it at all!

    Configuration file uses the .yml format (no tabs and be careful with spaces!) and will be at "plugins/InstaBreak/config.yml". The default (with added comments) is as follows:
    Code:
    config:
        dynamic: #These dynamic configuration settings can be changed with in-game commands aswell (read more in the commands section above).
            dropblocks: true #This controls if miniblocks are dropped when using the InstaBreak tool.
            toolid: 50 #This is the TypeId for the InstaBreak tool (Integer value). ID 0 (zero for AIR) = bare hand, ID 9999 = ANY block/tool.
        static:
            staticplugin: false #When set to "true" the plugin completely disables all in-game commands and omits any use of permissions. ALL players of the server will be in InstaBreak mode ALL the time, plain and simple :)
            respectprotection: true #When set to "true" the plugin tries to respect protection rules from other plugins. When set to "false" the InstaBreak tool will break protected blocks/items!
            workatrange: true #When set to "true" the InstaBreak tool will work at a distance.
            breakbedrock: true #When set to "true" the InstaBreak tool can be used to break bedrock blocks
            countstats: true #When set to "true" blocks broken with the InstaBreak tool will get added to the "Times Mined" counter in player Statistics.
    Changelog:
    Show changelog (open)
    InstaBreak v2.0, released on July 22nd

    • Fixed ranged breaking
      Ranged breaking now works thorugh liquids (water and lava).
    • Added possibility to set the InstaBreak tool to ANY block/tool
      When tool ID is set to 9999 players can use anything as the InstaBreak tool
    InstaBreak v1.9.1, released on June 27th

    • Fixed issue with "/ib i" command
      While not having permissions to use ranged breaking it was still indicated as bein ENABLED. Details here..
    InstaBreak v1.9, released on June 17th

    • Support for protection plugins!
      InstaBreak now supports protection plugins (see the feature list for details on which plugins I tested this with). This feature is enabled by default but can be disabled in the configuration file.
    • Breaking blocks from a distance! (ranged breaking)
      InstaBreak tool can now breaks blocks at a distance of 200. This feature is enabled by default but can be disabled in the configuration file. It also adds a new permission node.
      Ranged breaking is slow when keeping the mouse button clicked to repeat the action (due to the arm swinging animation). This can be overcome by rapidly re-clicking the mouse button (*click*click*click*click*).
    • Improved the configuration file layout.
      An example can be found in the configuration file section above. In the new file, "config.static.*" nodes are for static settings (which can only be modified manually by editing the configuration file). "config.dynamic.*" nodes are for dynamic settings which can be changed with in-game commands in addition to the configuration file.
      NB! Delete the old configuration file when updating to this version!
    • Code cleanup and smaller improvements.
      Message coloring is now done a little more elegantly. Bedrock breaking feature can now also be toggled in the configuration file (making it usable in servers which do not use the Permissions plugin aswell)
      NB! Changed the bedrock breaking permission node name to "instabreak.bedrock"!
    InstaBreak v1.8, released on June 14th

    • Multi-world support!
      Support for multi-world permissions! Disables InstaBreak mode if player moves to a world where he/she does not have sufficient permissions. InstaBreak mode forced by the "/ib e" command is immune to these restrictions!
    InstaBreak v1.7, released on June 1th

    • Updated the plugin to the first recommended CraftBukkit build for Minecraft beta 1.6
      Due to this the plugin no longer works with older CraftBukkit builds!
    • Fixed the issue which didn't allow breaking bedrock blocks through water blocks
      Also removed the constraint which did not allow instabreaking bedrock blocks at map height > 127
    InstaBreak v1.6.1, released on May 11th

    • Fixed issue of the console being spammed with a "[SEVERE] Could not pass event PLAYER_ANIMATION to InstaBreak"
      However it is no longer possible to break bedrock blocks when standing at a height of 127 or higher
    InstaBreak v1.6, released on May 11th

    • Breaking blocks using the InstaBreak tool gets counted in your Statistics (Times Mined value)
      This does not apply to bedrock blocks and can be disabled in the plugin configuration file
    • Fixed isse with disabling the plugin using a plugin manager
      Players who are in InstaBreak mode no longer keep it after the plugin is disabled
    • Announcement about changed settings (InstaBreak tool and block drops) is no longer server-wide
      Instead it is only shown to players that currently are in InstaBreak mode or who have sufficient permissions to enable it
    InstaBreak v1.5, released on April 18th

    • Implemented bedrock breaking
      Bedrock can now be broken (except the bottom-most layer of the map). This is enabled through a special permission.
    • Changed display message..
      ..which is shown if "/ib enable" or "/ib disable" is attempted on players that have sufficient permissions to toggle it themselves
    • Enabled "/ib info" command..
      ..for players that have been granted the InstaBreak mode with "/ib enable"
    InstaBreak v1.4

    • Added configuration file usage
      Plugin now uses a configuration file to save the important stuff when server "stop"-s gracefully. Configuration file is generated automatically with default values if it doesn't exist.
    • Added Permissions plugin support!
      Using it is completely optional. If it is not loaded the plugin will default to "ops.txt". See abobe for a list of grantable permissions..
    • Changed the overall command structure and added more commands
    • Added option to change the universal InstaBreak tool.
      Either from the configuration file or with in-game command (if sufficient permissions)
    • Added option to disable miniblock dropping.
      Either from the configuration file or with in-game command (if sufficient permissions)
    • Added option to grant InstaBreak mode to ANY player (and list or remove them)
      Done with in-game commands (if sufficient permissions). The target player does not need ANY permissions or special rights.
    • Added option to load the plugin in "static" mode.
      This can be set in the configuration file. It disables all in-game commands and any permissions functionality. All players of the server will be in InstaBreak mode, plain and simple :)
    • Rewrote core logic and general code cleanup.
      Instead of listening to block damage events (as in prior versions) the plugin now listens for player interaction events. Results in improved speed and functionality
    • Fixed breaking of TNT blocks.
      The explosion is no longer triggered upon breaking..
    • Fixed issue with miniblocks not being dropped.
      All blocks (except bedrock :( but I'm working on that) and placed items should now drop miniblocks.
    • Fixed issue with using InstaBreak tool on large chests (2 connected chests).
      There still *might* be errors if the 2 chests are placed using MCEdit tool (and perhaps other map editors).
    InstaBreak v1.3

    • Fixed issue with breaking bedrock blocks
      It shouldn't be possible to break bedrock blocks using this plugin any more
    • Fixed issue with entering the commands from server console
    InstaBreak v1.2

    • Changed command syntax.
      Using just "/ib" displays current status. Enable/Disable is now done via "/ib on" and "/ib off"
    InstaBreak v1.1

    • InstaBreak mode now only applies if player is using a torch (item id 50)
      This is in case other players in the server do not wish to benefit from the InstaBreak functionality for whichever reason. They can keep using their tools the normal way.
    • When plugin gets enabled/disabled it is globally announced
    InstaBreak v1.0

    • Initial version
    Known issues / Future ideas:
    Show issues and ideas (open)
    Known issues:

    • Items which are not breakable by hand (see table here) currently DO get broken. But they WILL NOT drop a miniblock for you to pick up fixed in v1.4
    • Typing in the commands from server console results in errors fixed in v1.3
    • It is in some cases possible to break bedrock (when clicking on a non-bedrock block and then moving cursor onto a bedrock block) fixed in v1.3
    • Using InstaBreak tool on a large chest (2 connected chests) results in an error and client gets disconnected. fixed in v1.4
    • Trying to break bedrock blocks through water doesn't work fixed in v1.7
    • Breaking blocks with InstaBreak tool is not takin into account in Statistics (maybe even a good thing) fixed in v1.6, is configurable
    • Disabling the plugin with a plugin manager (for example PlugMan) disables commands but does not remove InstaBreak mode from any players currently in it fixed in v1.6
    • Ranged breaking does not work through water (or lava) fixed in v2.0
    Future ideas:

    • Add permission support added in v1.4
    • Add ability to choose/change the universal InstaBreak tool added in v1.4
    • Do something with damaging TNT. Currently instabreaks but still triggers explosion. done in v1.4
    • Do something with damaging monster spawners. Currently instabreaks but leaves flame animation.
    • Enable bedrock breaking via special permission and/or configuration setting done in v1.5
    • If "/ib tool" or "/ib drop" commands are used, the status announcement will be made server-wide. This should probably be made to only the players that can actually use the InstaBreak tool fixed in v1.6
    • InstaBreak mode granted with "/ib enable" command is lost upon player reconnecting. Maybe it should persist until disabled manually or server "stop" cancelled until highly requested
    • Add direct download link for only .jar file added since v1.5
    • Multiworld support.. added in v1.8
    • Breaking blocks from a distance added in v1.9
    • Allow players to use any block/tool as the InstaBreak tool added in v2.0
    • Make instabreak tool instakill entities
    • Add in-game commands to toggle ranged and bedrock breaking
    Like this plugin?
    In that case feel free to show your support by making a donation :)
    [​IMG]
     
  2. Offline

    hiphopgamer

    so enabling this will allow nonops to break blocks in one hit with a torch?

    EDIT: THANKS
     
  3. Offline

    R3ality

    Currently, yes.
     
  4. Offline

    hiphopgamer

    A little laggy for my likes, will keep an eye on this
     
  5. Offline

    R3ality

    New version..
     
  6. Offline

    Treksdot

    Hello and thank you for taking the time to make this plugin R3ality. Would it be possible to make the torch use optional so we can use tools to do it? An even more complex option would be to require the appropriate tools for certain materials to get the instant break. (For example, you'd need a pickaxe to instabreak stone etc.) Also, could you add Permissions support? That said this plugin is a much smoother solution than the Ultimate Fist mod for MC. (A friend of mine went through the trouble of creating an Ultimate Fist SMP mod for CB and it wasn't easy.) Would appreciate any of these changes.
     
  7. Offline

    R3ality

    Hi Treksdot, thanks for the feedback! :)

    Permission support and ability to set which item is used as the universal instabreaker tool both feel like a natural progression for this plugin. I will definitely look into both of those!

    Appropriate tool for each block type probably won't make the cut though. The initial reasoning behind creating this plugin included hopes to:
    • lessen the need to have multiple tools with you - inventory space lost
    • lessen the time spent striking (obsidian is evil!!11 :D) at each block - time lost
    • lessen the impact of tool durability (yay for the torch) - need to repair/replace tools
    ..so such a feature probably wouldn't align well with those. But feel free to elaborate further on why and how that would benefit players/admins and I might still consider it of course..
     
  8. Offline

    Steve Cole

    does this work with torchburn? if not, could you look into it, i loved the idea behind torchburn but needing to switch to the pick to mine turned off the light so it wasn't useful to me at all.
    also this would have to be on a perplayer bases or work with residence for me to use it because the worldedit superpick can destroy blocks in other peoples residence/zones so it isn't a good choice for a worldwide quickmine feature.
     
  9. Offline

    R3ality

    Quick initial test showed that InstaBreak v1.3 and TorchBurn v1.2 DO seem to work together!

    There were occasional lighting issues when using the InstaBreak tool while the torch was burning. Also weird behavior in some cases when placing the burning torch on a block. However this may be the "normal" TorchBurn functionality. I will do a couple of more tests later tonight..

    As for the permission part, I will add something eventually. I haven't decided yet how to regulate it exactly (to leave option to turn on for whole server or not, ect.)
     
  10. Offline

    Kryppuk

    when you add permissions could you even add the permission for admins to break bedrock again?
    I'd have a use of it ^^
     
  11. Offline

    Steve Cole

    yes that sounds like the behavior i got when i was only using torchburn. so glad to hear they work together.

    I don't program or develop plugins but i imagine I would try and do the following.
    have a config file like below
    Code:
    config file:
    use-permissions=yes
    if set to "no" everyone can use /ib t.
    if set to "yes" it depends on permissions.
    then have the following permission nodes
    Code:
    Permission nodes:
    instabreak.ib.use
    this allows player to be the target of /ib a or /ib r
    
    instabreak.ib.toggle
    this allows players to toggle IB for themselves
    
    instabreak.ib.admin
    this allows player to assign IB to players that have the instabreak.ib.use permission
    
    
    then have the following commands
    Code:
    /ib t
    this would toggle IB for the issuing player
    /ib a [player]
    this would enable IB for target player
    /ib r [player]
    this would disable IB for target player
    /ib rall
    this would disable IB for all player
    *preferably just the ones that can't use /ib t but those players can always just re-enable it.
    this would be my suggestion but i have no clue what code or the amount of work this might take.
     
  12. Offline

    R3ality

    @Steve Cole: Great post! As I am not a Permissions plugin user myself (so far, anyway) that gave a very nice and thorough overview to a possible way of implementing support for it!

    Priority has so far been to fix the issue with dropping miniblocks after breaking the block. I think (knock on wood (with a DIAMOND_AXE :D)) I have that sorted now though so I will start looking into the Permissions topic now..

    OK I thought about it a little and this is what I came up with:
    This is subject to change as I have not started implementing it yet. But that is how I'm planning it at the moment..

    Comments are welcome..

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

    statistx

    Hi, i finally got my permissions and all the mods that are supported to work.
    I like your mod, not because i need or want it, but because it stops the nagging of the other guy playing on my server and building a mobtrap ^^
    only thing there: He is not supposed to have commands to all the other mods and as far as i witnessed adding him to op messes up the whole permissiontree.

    Would you be so kind/would it be possible, that you upload a simple optional "no op required" or "all commands for everyone"-type of version?

    That would be so helpful til you get the permissions system to work and i suppose (as I'm not really experienced with java modding) that this would take you only a minute?

    Thanks
     
  14. Offline

    R3ality

    @statistx: The other guy doesn't need to have OP priviledges on the server if he simply wants use the InstaBreak tool :). OP is only required to run the command "/ib". After running the command, the plugin features will be enabled to all players of the server.. (so you can run the command yourself)

    So basically:
    • Start the server
    • Type "ib" into the server console OR connect to the server with your character (assuming You have OP) and type "/ib" into in-game chat.
    • Enjoy! InstaBreak works for all players (until next server restart)
    I hope I didn't misunderstand the case you were describing.
     
  15. Offline

    Steve Cole

    looks like a true permission supportable plugin.
    can't wait to see it when its done.
    i wish i had time to make plugins but too busy with school(web programming) and actually playing minecraft.
     
  16. Offline

    xCrap

    Hmm.. What about making this toggle-able?

    Some people give Bedrock to themselves to make nicer homes and well, mistakes are common..
     
  17. Offline

    R3ality

    @xCrap: Yes, it is a planned feature, it was already requested by Kryppuk aswell. It will probably have a special assignable permission and/or some configuration file based option.

    I'm considering a minor limit on the editing permission though as to preserve the bottom-most layer of bedrock (height 0). But I'll see how it turns out when I get to it :)
     
  18. Offline

    haschtekaschte

    i downloaded and and installed the plugin
    if i type /ib on it says it is activated but i still need some time to break the blocks(like normal)
     
  19. Offline

    Poinball

    I need permissions Support !! :D
     
  20. Offline

    statistx


    Thanks, thought about that and still need to try it. Have no idea if that messes up the whole permissions setup i have or not, but since i can have all the rights anyway, i THINK it should be no problem...so basically i try if the other guy still has no rights besides building and i have the permissions-mod defined rights plus the ib commands by the ops.txt
     
  21. Offline

    Steve Cole

    this plugin effects the "torch" not the "pick"
    if you are using the torch, what CB are you running and do you get any errors in the console?

    if you really want this and need permission support you can try worldedit but it comes with alot of other features.
    its what i use now but only for admins.

    just a warning, i haven't tried it with this plugin but the superpick from worldedit ignores protected blocks so if a griefer can use it they can destroy whatever they want. so make sure you test this against your protection before letting untrusted players use it.
     
  22. Offline

    R3ality

    New version..
    Please read the full details in the original post (1st) of this thread.
    More features = higher chance for issues and bugs. Please let me know if you find any or if the content/wording of the original post needs improving (something I didn't explain well enough maybe?) :)

    @hiphopgamer: I'd suggest to try the plugin again with the latest version. I changed the core logic of the plugin to use player interaction events instead of listening for block damage events. Also there is now an option to disable the dropping of miniblocks when using the InstaBreak tool (via configuration file or in-game command). Both of these should result in better performance.

    @Treksdot: Torch use is now optional as you requested :) (InstaBreak tool can be set to ANY block/tool ID). Also v1.4 now includes permissions support..

    @Steve Cole: Residence (not being able to break other peoples blocks) is not supported as there is no common library/plugin which implements it (afaik). InstaBreak tool will override any build-inhibiting plugins (including the "build: false" of Permissions). And Permissions support is now done (thanks again for the initial ideas)..

    @Kryppuk and @xCrap: Sorry, permission/settings to enable bedrock block breaking didn't make it into this release :(. I actually have it coded but there are some issues which I haven't been able to overcome yet (*might* be CraftBukkit related aswell) so I had to disable it before compiling. But I do like this idea and will try to implement it whenever I can..

    @Poinball: You got it! :p

    @statistx: While that should have worked fine, permissions support is now here (among other features which may help you). Get the latest version :)

    Didn't even notice the new recommended build..
    Now tested with CraftBukkit #670. Seems to work fine..

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

    Treksdot

    Testing the new version on my server as we speak. Thanks for making the tool selectable and for adding Permissions support. Even nicer that you gave us the option to permanently enable it. Will get back to you if any problems.
     
  24. Offline

    SnowFlyer

    This is SO handy! Thanks a ton bud!
     
  25. Offline

    Treksdot

    Found a possible glitch with this plugin and it's the same problem I've noticed with WorldEdit's superpickaxe as well. When InstaBreak mode is enabled break notifications are no longer registering with the FoundDiamonds plugin. With ib mode disabled the FD plugin properly announces when specified ores are mined. No error messages in console, just a lack of announcements. Not sure if this is a bug on your end R3ality or the authors of FoundDiamonds/WorldEdit but it's something I've noticed with plugins that instantly break blocks.
     
  26. Offline

    R3ality

    @Treksdot: You are spot on! To my knowledge ALL plugins which provide any kind of similar functionality (like instabreaking, etc.) should have the same quirk to them. The reason for this is that for the moment there is no "destroy" method (afaik! if anyone knows different please let me know) available with CraftBukkit (which would damage the item/block resulting in breaking it). So the only (more or less) option is to "simulate" the block breaking like this:
    1. get the location and type of the block which should be broken
    2. set the type of the block to AIR
    3. (optional) drop miniblock(s) or items of the correct type at the location the block was at
    So you see, nothing *actually* gets broken, rather just turned into air. And because FoundDiamonds (and many other plugins) is listening for a block break event - it never catches one :oops:

    This is something I will try to keep looking into in case a solution pops up or any new functionality gets added into CraftBukkit. But for the moment, I'm afraid there isn't much I could do about it..
     
  27. Offline

    Steve Cole

    Wasn't expecting an update this quickly, your either good at coding or you have a lot of free time
    Can't wait to get it set up and start mining with my torchburn torch
    and i figured the residence/build:false thing wasn't fixable but just wanted to let people that might not know about it know. i was a little disappointed when i first set up worldedit and found out that build:false was useless against a superpick.

    thanks for the awesome plugin and i really like the way you set up the permissions and config file.
     
  28. Offline

    R3ality

    @Steve Cole: This being my first plugin I have been a little obsessed with polishing it to a state which I'm (and hopefully you guys) more or less happy with. As Java actually probably isn't one of my strongest sides working on this has been a very interesting challenge.

    But yes, sleep time and efficiency at work/school have fallen to sub-bedrock levels these past couple of days.. :D
     
  29. thanks for the plugin !

    what does:
    Code:
        plugin:
            static: false
    do ?
     
  30. Offline

    Treksdot

    Setting that to true enables InstaBreak mode by default so you don't have to activate it every time you connect to the server.
     

Share This Page