[INACTIVE][SEC] BlastControl v1.0.6 - Flexible TNT and Creeper restrictions/modifications [818]

Discussion in 'Inactive/Unsupported Plugins' started by happo2000, Mar 11, 2011.

  1. Offline

    happo2000

    BlastControl - Flexible TNT and Creeper restrictions and modification plug-in
    Version: v1.0.6
    (Optional) Permissions Version: v2.5.x

    Lets face it, TNT is fun. This plug-in is not to take away TNT from Minecraft, but restrict it's use to certain users. This plug-in provides the administrator the ability to restrict TNT use through different permissions. There are currently three levels of TNT usage restrictions that the administrator can apply to their users.

    Permissions:
    Code:
    bc.tnt.allowed - This permission will grant the user the ability to place and activate TNT freely under the indicated blast limit
    bc.tnt.abovelimit.place - Allows the user to place TNT above the specified blast limit
    bc.tnt.abovelimit.activate - Allows the user to activate TNT above the specified blast limit
    bc.tnt.abovelimit.link - Allows the user unrestricted linking of TNT blasts
    bc.tnt.immune - Gives player immunity to damage from TNT blast
    
    How it works:
    The basic idea of this plugin is that when a user activates TNT, the chunk itself is tagged with that users permission level for the next few seconds. So any linked explosions are also covered under that specific permission and the timer is extended. As an example, if the user has the bc.tnt.abovelimit.place but not the bc.tnt.abovelimit.activate permission and attempts to chain explosions that link above the blast limit, the TNT above the limit will not explode.

    What is the blast limit or blast height limit?

    They are the same thing. This is the limit setting to deny TNT or Creeper explosions from happening above ( this just translates into the y-axis range ). You can get the current y-axis of your character by reading the value that F3 puts onscreen within Minecraft. 0 being bedrock level and 128 being the highest point in the sky.

    Why 'bc.tnt.abovelimit.place' permission?
    On the server that I play on, TNT is used allot for leveling out large strips of land or abandoned buildings in SMP. This allows a regular/VIP user to place the TNT and call an Admin/Mod to detonate it.

    Features:
    • Restricts Creepers to exploding over the blast limit
    • Grants Creepers the ability to attack with fangs if their explosions are inactive
    • Linking TNT explosions work properly, even across adjacent chunks
    • Allows specific groups of users to use TNT in different ways
    • Gives the ability to reclaim placed TNT
    • Allows admin to change TNT properties
    Command Permissions:
    Code:
    bc.set.limit - Allows the use of the '/bc limit', '/bc triggerlimit' and '/bc linklimit'
    bc.set.enable - Allows the use of '/bc enable' and '/bc disable'
    bc.set.creeper - Allows the use of '/bc creeper'
    bc.tnt.reclaim - Allows the use of '/bc reclaim'
    bc.set.yield - Allows the use of '/bc yield'
    bc.set.radius - Allows the use of '/bc radius'
    
    Commands:
    Code:
    '/bc help' - Displays help
    '/bc status' - Shows the current blast limit and the current users restrictions
    '/bc reclaim' - Toggles TNT Reclaim mode on and off
    '/bc [enable/disable]' - Enables/disables BlastControl
    '/bc limit [x]' - Sets the new blast level to x
    '/bc triggerlimit [x]' - Sets the new trigger time limit to x ( in milliseconds )
    '/bc yield [x]' - Changes the blast item yield of explosions ( percentage )
    '/bc radius [x]' - Changes the blast radius of TNT ( in blocks )
    '/bc linklimit [x]' - Changes the maximum amount of linked TNT explosions
    '/bc creeper [x]' - Changes creeper behavior ( see creeper behavior table below )
    '/bc reload' - Reloads user configuration ( only available when Permissions Plug-in is not present )
    
    Creeper Behaviours:
    Code:
    'enable' - Does not limit creeper explosions in any way
    'disable' - Disables creeper explosions completely
    'disable-fangs' - Disables creeper explosions completely but gives them fangs to attack with
    'disable-entity' - Disables creeper explosions from doing any block damage, will still damage entities (Players, other mobs)
    'disable-despawn' - Disables creeper explosions completely but, despawns them on destruct
    'limit' - Restricts creepers to only exploding under the blast limit
    'limit-fangs' - Restricts creepers to only exploding under the blast limit, but gives them fangs above the limit
    'limit-entity' - Restricts creeper exploding normally under the blast limit, above the limit they will only do entity damage (no block damage)
    'limit-despawn' - Restricts creepers to only exploding under the blast limit, but despawns them when they attempt to explode above the blast limit
    
    Future Development: (opinions needed, these are not set in stone)
    • Adding TNT chain limits for different user permission levels
    • Giving different TNT strengths for different user permission levels
    • Allow control over Ghast explosions (low priority)
    • Throwing primed TNT (opinion needed)
    • Allow arrows to prime TNT (opinion needed)
    Restrictions:
    • This plug-in will disable the ability to activate TNT through redstone and fire
    Download the latest version of the BlastControl Plug-in

    Download Older Version of the BlastControl Plug-in

    Download BlastControl Source

    Changelog:
    Version 1.0.6
    • Fixed a typo in creeper setting, was 'limit-depawn' changed to 'limit-despawn'
    • Added new permission 'bc.tnt.abovelimit.link'
    • Added command '/bc linklimit <#>'
    • Fixed an issue with 'limit-despawn' where it was letting the creeper attack
    Version 1.0.4
    • Added 'bc.tnt.immune' permission
    • Allow players to be immune to damage from TNT (other sources act normally)
    Version 1.0.3
    • Removed Compatibility code for CB 599 and below for efficiency
    Version 1.0.2
    • Added compatibility with major revisions to CB 558+ (tested on CB592)
    • Removed Right-Click to reclaim TNT until CB API changes calm down
    Version 1.0.1
    • Removed a debug message that accidentally got left in for v1.0 release
    Show Spoiler

    Version 1.0
    • Added explosion sound effect to creepers explosions while only doing entity damage
    • Shortened creeper attack range by 1 block
    Version 0.9.3
    • Added new creeper settings 'disable-entity' and 'limit-entity'
    Version 0.9.2
    • Fixed an incompatibility with changing Yield and CB 556-
    Version 0.9.1
    • Made Permissions plug-in optional, capable of using user.properties file
    • Moved configuration files to plugins/BlastControl
    • Renamed blastcontrol.cfg to settings.properties
    • Will automatically convert your existing settings
    • Added '/bc reload' which is only available when Permissions plug-in is not present
    • Cleaned up settings and configuration code
    Version 0.9
    • Added ability to set TNT Blast radius using '/bc radius'
    • Added new permission 'bc.set.radius'
    • Added ability to set TNT Blast item yield using '/bc yield'
    • Added new permission 'bc.set.yield'
    Version 0.8
    • Fixed a bug that could cause an infinite loop
    • Also moved project to GitHub
    Version 0.7
    • Fixed a bug where when a creeper was attacking with fangs, damage would come from player instead of creeper
    Version 0.6
    • Right-click of TNT with nothing in hand will reclaim, relies on 'bc.tnt.reclaim'
    Version 0.5
    • Added command '/bc reclaim' to allow users to toggle TNT pickup mode
    • Added new permission 'bc.tnt.reclaim'
    Version 0.4
    • Fixed a bug that could cause an infinite loop
    Version 0.3
    • Allowed commands to be accessed via console
    • Added a new status item showing the time-to-link timeout
    • Changed status to not show player restrictions if plug-in is disabled
    • Plug-in will disable gracefully if Permissions plug-in is not loaded
    • Changed Plug-in Hooks from Lowest to High - ( I misinterpreted originally )
    Version 0.2
    • Changed permission 'bc.tntallowed' to 'bc.tnt.allowed'
    • Changed permission 'bc.abovelimit.place' to 'bc.tnt.abovelimit.place'
    • Changed permission 'bc.abovelimit.activate' to 'bc.tnt.abovelimit.activate'
    • Changed permission 'bc.enabledisable' to 'bc.set.enable'
    • Changed permission 'bc.setcreeper' to 'bc.set.creeper'
    • Changed permission 'bc.setlimit' to 'bc.set.limit'
    • Removed permission 'bc.status'
    • Added new creeper settings 'disable-despawn' and 'limit-despawn'
    • Slightly increased the range on creeper fang attacks
    • Changed command '/bc setlimit' to '/bc limit'
    • Added command '/bc triggerlimit'
    Version 0.1
    • Initial Release
     
    nendi, Thomasice and Aaron_Merric like this.
  2. Offline

    happo2000

    Ok. Let me check the links
     
  3. Offline

    MaRul101

    Is there a way to do a blast mining setting so that a player can get 100% of the blocks destroyed.
     
  4. Offline

    happo2000

    I fixed the link.

    Currently, the plug-in doesn't modify the strength of the TNT. But I do have plans to work on that next.

    I posted the source code now... Yes, I'm ashamed of the config file loading/saving. :p

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

    Delois

    Thank you, the link is working now :3

    EDIT: One thing I noticed is with HeroicDeath, it says I was killed by myself, anyway to make it look like a creeper with fangs killed me? Just a suggestion, great plugin :3
     
  6. Offline

    happo2000

    Oh. Really? Hmm. I'll check that out right now. ( I don't normally run that plug-in. )

    Ok, it's been fixed. HeroicDeath now reports it correctly.

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

    Delois

    wow, fast fix, thanks :3
     
  8. Offline

    happo2000

    Once you said what was happening and I looked at the code, it was pretty obvious what I did wrong.
     
  9. Offline

    liquidfired

    When I do huge tnt explosions, the blocks dont regenerate, however when i do just 1 or 2 tntts in a explosion, the blocks regenerate. Do you know why now? I deleted no explode.
     
  10. Offline

    happo2000

    Can I connect to your server?
     
  11. Offline

    liquidfired

    my ip is static so try to login quick. 114.44.19.188:32769
     
  12. Offline

    ArsenicLullaby

    This is exactly what I was looking for but... Would it be possible to get a Permissions free version? Please =)
     
  13. Offline

    happo2000

    Hmm. How do you imagine the permissions working? (Without permissions )

    bc.tnt.abovelimit.* - Ops
    bc.tnt.reclaim,bc.tnt.allowed - Default
     
  14. Offline

    MaRul101

    More what I meant was if you could edit the drop rate for explosions.

    "Mining using TNT might be faster than mining by hand but it is impractical for gathering resources; about 70% of the blocks are completely destroyed in the process."
    -Minecraft Wiki
     
  15. Offline

    ArsenicLullaby

    Yes, being able to set it with the op list would work fine in my case. But, I wouldn't mind properties file where I can toggle features ; )
     
  16. Offline

    happo2000

    I'll see what I can do.

    So I added the ability to change the radius of the explosion and the item yield. It's way too much fun to set the yield to 0% and set TNT radius to something like 15 blocks. All the fun of TNT without the lag. ( It seems that all the items are what causes the lag )

    But for what you want, you should set the yield to 100%

    I'll see what I can come up with tonight.

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

    happo2000

    https://github.com/downloads/happo2000/BlastControl/BlastControl-v0.9.1.jar

    Here's a version you could test, what this will do is create a user.properties file on first run when permissions plugin is not present. You can then modify the file and then type '/bc reload' in game as an OP to force the user permissions to reload.

    There's been quite a few changes code wise in this update. So I'm hesitant to fully release it at this point. (I'm going to do more of my own testing tomorrow evening.)
     
  18. Offline

    Seraph92

    I am having an issue with the yield. I set it to 2% and everything still drops. It tells me that it is set to 2% but 100% of items drop. changing the radius works though.

    I am running CB 556 with Permissions 2.5.4
    I am the admin, and have permission.
     
  19. Offline

    risinglotus

    Is it possible to make Creeper explosions not destroy things but still hurt people?

    Sorry if it has been answered before.
     
  20. Offline

    happo2000


    Currently, there is no setting to still allow them to explode but only do entity damage. I could look at putting that in though.

    There is a settings though that gives them fangs to attack with when they are unable to explode.

    I was able to figure it out, I was doing my development on 558. ( 557 fixed the issue that was causing yield not to be set. )

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

    MineralMC

    I've looked around, but can't seem to find any detailed help for the commands. How exactly does the blast height work?

    What settings would I use if I only wanted my 'regular' players to only explode one block of TNT at a time? I'm running FakePermissions with GroupManager. I'm also curious as to how the 'limit-fangs' works with the creepers. Does this mean they'll only explode vs. certain players? Oh, and is there an option for them to still explode, but not to damage the environment? My players have masses of music discs at the moment, from baiting the creepers then leading them into skeletons, it's upsetting the economy a bit!
     
  22. Offline

    happo2000

    The Blast Height works by only allowing certain users to detonate TNT above the blast height. This is also applied to chain-reaction TNT explosions ( there by not letting the users getting around this limit by chaining TNT above the blast limit. ) What I think I will do is maybe put a small video together explaining the different permissions and showing their outcome.

    Basically, if you give the permission 'bc.tnt.allow' to a user. They are free to place/activate/chain TNT under the blast limit. If they make any attempt to place or set off TNT through any means above the blast limit, it will be denied and will not explode. This permission is required to use TNT at all. ( Without this permission, 'bc.tnt.abovelimit.*' are useless to the user. )

    If the user has 'bc.tnt.abovelimit.place' permission. They are allowed to place TNT above the blast limit. This permission does not allow them to activate or chain TNT explosions above the blast limit. The only the permission 'bc.tnt.abovelimit.activate' allows them to detonate above the blast limit. This includes chaining.

    As for the creeper modifications, permissions do not play any role in their behaviour. But they do adhere to the blast limit if one of the 'limit-*' settings are used. 'limit-fangs' will only let them explode when they are under the blast limit, if they are above the limit, they will attack similar to zombies.

    I had never considered imposing a TNT chain limit for users, but I think that's a good idea. I will consider adding it in a future version.
     
  23. Offline

    MineralMC

    Thanks for the explanation, I'm still a little fuzzy, though. Is blast-height a literal height? As in, the "Y" of the Minecraft world? So, if I set blast height to 20, players won't be able to use TNT unless they're 20 blocks or lower than the bottom of the world?

    And yes, allowing a chain limit would be *exceptionally* useful, as I have no problem with my players using TNT, just it causes some lag issues when players decide they want to detonate 10 at once!

    Cheers for the quick reply, I appreciate it!
     
  24. Offline

    happo2000

    No problem. The blast limit is the y-axis in minecraft. So zero being the first bedrock level and 128 being the highest point in the sky. It's been recommended that I put something in the /bc status command to show the user's current height.
     
  25. Offline

    MineralMC

    No need, MC has it built in; F3 for display + co-ords! (and wallhack for mobspawners)

    Also: Kick. Ass. This is going to make TNT control a blast (literally). Any chance of a minor rewrite of the plugin description, maybe outright mention that the 'blast height' is literally a Y-axis, as I had absolutely no clue until your previous post.

    Keep up the good work!
     
  26. Offline

    SneakyTax

    I also would like to see this implemented. I enjoy that creepers sneak up on ya and blow up (Ssssss BOOOM YIKES!!!), but I don't really want the explosion to destroy what I am working on (or what folks have made). The "Fangs" option is cool for folks that don't want explosions at all. The mods I have run in the past process the creeper explosion but replace the blocks afterward.

    Quick question - is BlastRadius=4 BlastYield=100.0 the current "default" value that TNT would have for BlastRadius if BlastControl were NOT running? In other words I would like to have the TNT have the same settings as native Minecraft without BlastControl enabled - just want to negate Creeper messes and put some limits on HOW MANY TNT's can be placed (via BlastLimit).

    Thanks again for the SUPER work! It is GREAT to have options and well-written code (with online help/etc) for a change! The other blast-creeper mods were falling way into the abandoned realm!
     
  27. Offline

    happo2000

    I'll see about adding the creeper explosions with no block damage. Shouldn't be too difficult.

    The Minecraft default is BlastRadius=4 BlastYield=30.0. When you installed BlastControl, did it have those as defaults? ( I'll check it out tonight once I get home, I'm at work currently. )

    Thanks for the comments about the plug-in. :)
     
  28. Offline

    MineralMC

    Am I misunderstanding what BlastYield does, is it not the % of blocks that you can recover from a TNT explosion? Can I set it to 100% and use TNT to mine out veins of coal, for example?
     
  29. Offline

    happo2000

    Yup. If set the yield to 100.0% and you blast the TNT on a coal vein, you will recover all the items from the blocks that were destroyed.
     
  30. Offline

    MineralMC

    Neat. I've gone ahead and set it to 90%, with a radius of 10. My players are going to get a kick out of blastmining! Cheers, happo!
     
  31. Offline

    happo2000

    Be careful with that though. Having so many entities (items/players/monsters) on screen tends to lag the client allot.
     

Share This Page