[MECH/FIX] DropPlugin v2.1 - Break blocks, get modified drops (Permissions, LogBlock support) [935]

Discussion in 'Inactive/Unsupported Plugins' started by Juze, May 8, 2011.

  1. Offline

    Juze

    DropPlugin - Break blocks, get modified drops!
    Version: v2.1
    Tested with Permissions 2.7.4-3.1.5b and CraftBukkit #1000
    A collaboration with @ChrizC

    At long last, v2.x is here!

    This plugin changes some drops when some blocks are broken. For example, glass drops glass, wooden stairs drop wooden stairs, ice drops ice... Comes with configuration and Permissions support!

    If Permissions plugin is not found, the plugin uses OPs instead.

    Looking for more custom drops? Here:
    A fair note on updating to v2.x: A lot of things have changed, and it is highly recommended to delete your config file (just in case) and reconfigure your Permissions. After that, you shouldn't need to delete your config file anymore again after an update. :)


    Features:
    • Blocks have different drops
    • TNT explosions can be disabled
    • Permissions support (OP check if not found)
    • Configuration for customization
    • Commands to reload, enable and disable drops
    • LogBlock support
    • Easy to use
    Drops (open)

    These drops can be changed (optional with config and Permissions):
    • Glass - Drop glass!
    • Bookshelf - Drop a bookshelf!
    • Ice - Drop ice!
    • Stairs - Drop stairs!
    • Lightstone - Drop a lightstone block!
    • Mobspawner - Drop a mobspawner! (Note: Pigspawner. Need /mspawn or other command to change the spawn)
    • Grass - Drop grass!
    • Ores - Drop ores instead of ingots!
      • Redstone - Drop redstone ore
      • Diamond - Drop diamond ore
      • Lapis - Drop lapis ore
      • Coal - Drop coal ore
    • Ingots - Drop ingots instead of ores!
      • Gold - Drop gold ingot
      • Iron - Drop iron ingot
    • Stone - Drop stone!
    • Leaves - Drop leaves!
    • TNT - Instead of an explosion, drop TNT instantly like any other block!
    • Cake - Drop cake! (Infinite source of food)
    • Snow block - Drop a snow block!
    • Snow tile - Drop a snow tile!
    • Gravel - Drop flint (100% chance)!
    • Clay - Drop a clay block! (Note: If enabled, does NOT drop clay balls -> no bricks)
    • Logs - Drop 4x wood!
    • Doublesteps - Drop a doublestep instead of two steps!
    • Boat - Drop a boat!

    Download (Latest, wget friendly):
    DropPlugin.zip (.jar)
    Source Code

    Usage:
    Place the DropPlugin.jar in your server's /plugins/ directory, just like any other plugin. Restart your server.

    A configuration file will be generated in /plugins/DropPlugin/ folder. Open DropPlugin.properties with a text-editor of your choise (Notepad++ is great). Here you can disable and enable different drops.

    Finally, if using Permissions, configure your groups to have their appropriate node. For quick install, give 'DropPlugin.drop.*' for your default builder group.

    Issues & To-do:
    Please post any issues on GitHub. Current and previous issues can be found from there too.

    Config (open)

    Default configuration (config.yml) can be found here!
    Show Permissions

    Permission nodes:
    DropPlugin.drop.* - Gives access to all custom drops
    Drops (open)

    DropPlugin.drop.glass - Drop glass
    DropPlugin.drop.bookshelf - Drop bookshelves
    DropPlugin.drop.ice - Drop ice
    DropPlugin.drop.glowstone - Drop lightstone
    DropPlugin.drop.lightstonedust - Drop 9x lightstonedust (Removed in v1.2.1, Beta 1.6.6 has this.)
    DropPlugin.drop.stairs - Drop stairs
    DropPlugin.drop.mobspawner - Drop mobspawners
    DropPlugin.drop.grass - Drop grass
    DropPlugin.drop.ores - Drop diamond/redstone/lapis/coal ores instead of ingots
    DropPlugin.drop.leaves - Drop leaves
    DropPlugin.drop.stone - Drop smoothstone
    DropPlugin.drop.tnt - Drop TNT instead of exploding it! (Works as a nerf) Removed in v1.2.4, use DynaHate instead.
    DropPlugin.drop.cake - Drop cake
    DropPlugin.drop.clay - Drop a clayblock
    DropPlugin.drop.ingots - Drop iron/gold ingots instead of ores
    DropPlugin.drop.flint - Drop flint from gravel
    DropPlugin.drop.snow - Drop a snowblock/snowtile
    DropPlugin.drop.wood - Drop 4x wood from log
    DropPlugin.drop.doublesteps - Drop a doublestep instead of two steps
    DropPlugin.drop.boat - Drop a boat

    DropPlugin.admin.* - Gives access to all administrative commands
    Admin (open)

    DropPlugin.admin.enable - Allows to enable drop in specified world
    DropPlugin.admin.disable - Allows to disable drop in specified world
    DropPlugin.admin.reload - Allows to reload the config for world(s)
    Show commands

    /drops help - Shows the help menu
    /drops enable [name] [world] - Enable drop in specified world (DropPlugin.admin.enable)
    /drops disable [name] [world] - Disable drop in specified world (DropPlugin.admin.disable)
    /drops reload [world] - Reload configuration for specified world (DropPlugin.admin.reload)
    /drops version - Prints the version number

    Changelog:
    Version 2.1 (Download)
    • Added support for LogBlock, as blocks were not logged before this update.
    Version 2.0 (Download)
    • Added help and version commands
      • /drops help - Shows the help menu
      • /drops version - Prints the version number
    • Updates no longer break the config
    • Ice no longer generates water on break
    • Renamed a few config and permission nodes (Glowstone)
    • Added boats
    • Working multiworld configuration (Dev build users, this has been fixed!)
    • Major code cleanup
    • Something I've forgotten to list, this update was huge and took a lot of effort! Enjoy.
    Show changelog

    Version 1.2.4 (Download)
    • Removed TNT support (see DynaHate)
    • Added log to 4x wood as suggested by @ThreeDGuy .
    Version 1.2.3 (Download)
    • I would almost consider this as v1.3 update but rushed with the release of new drops, so it's called v1.2.3.
    • Added snow
    • Added clay
    • Added gravel to flint
    • Added ingots
    • Code cleanup
    Version 1.2.2 (Download)
    • Added cake, yummy.
    • ...that's all, this update is optional.
    Version 1.2.1 (Download)
    • Added redstone ores (Whoops, forgot in v1.2)
    • Removed lightstonedust support since Beta 1.6.6 has this implemented.
    • Fixed reduntant drop modify for gold/iron.
    Version 1.2 (Download)
    • Code cleanup
    • Changed config to .yml
    • Added optional support for leaves, ores, smoothstone, doublesteps and TNT for freebuild servers (also works as TNT-nerf)
    • Fixed GriefAlertR conflict issue.
    • Config bug fixed by @ChrizC , thanks again!
    • I never included this for public download, it's just here in changelog if you want to try it since I released the source for it!
    Version 1.1 (Download)
    • Changed Permissions from dropplugin.* to DropPlugin.*
    • OP check works again (thanks @t3hk0d3 !)
    • Added support for grass and mobspawners
    • Code cleanup
    Version 1.0 (Download)
    • Initial release
    Last words (open)
    This was my first experiment Java and I wanted to see if I could create a plugin. I ended up choosing something easy average but very useful.

    I am still a Java newbie and I would appreciate if you would go easy on me.

    Thanks to people who helped me with a few problems! #bukkitdev IRC

    A special thanks @ChrizC for teaming up together and doing major parts of the code!
     
    emoknight likes this.
  2. Offline

    emoknight

    u no they do not drop when using superpickaxe
     
  3. Offline

    Juze

    Yes, I'm aware of that but probably can't fix it. I've seen many other plugins have this too.

    EDIT: I just noticed I had broken my OP permission code at some point. Will fix in v1.1.
     
  4. Offline

    iloveportalz0r

    Wow, I JUST made a plugin that does the exact same thing! I was going to post it, but you posted yours first :(
     
  5. Offline

    ZachBora

    @Juze @emoknight
    I think theres a config in Worldedit to make superpickaxe drop items. I know //single gives me back the item on my server.
     
  6. Offline

    JeffTheProGamer

    Can you do something for Lime Wool because every time i break it, it goes back to regular wool. So could you work on that.
     
  7. Offline

    Juze

    Sorry for late reply, I've read you all a week ago but couldn't reply.

    I believe that's a Bukkit issue, it may be possible for me to fix, but I cannot quarantee anything.

    Also, for the OP permission thing, I think I will not fix it after all... Use Permissions for that.
     
  8. Offline

    KaosXi

    you dont have a permissions listed for stairs

    **EDIT**
    can you make ice not spawn water in the nether? or in fact, disappear if placed in the nether like regular water?
     
  9. Offline

    Juze

    Ah thanks, listed it. :)

    For the ice, I could work on multiworld but your request is a bit off-purpose of the plugin. I still need to figure out how to disable water flow after ice is broken. I may just develope another plugin for that... Will look into it.
     
  10. Offline

    Juze

    Just an update: I've been busy with schoolwork and I'm working on getting the big v1.1 release out. It will include code cleanup, support for grass and mobspawners, probably some ores such as iron ore to drop iron ingots and more. Maybe a new config. I need to figure out how to update the config on update though, and to fix a few issues I have. I'm still trying to keep this plugin pretty much lightweight.
     
  11. Offline

    jtlcr777

    This plugin is pretty helpful, im glad for the config.
     
  12. Offline

    austin101

    I love this plugin, but it has compatibility issues with bigbrother and grief alert. If someone were grief any glass, glowstone, bookshelves, or stairs I would not be able to do a rollback or see who broke those blocks.

    My members love this plugin but I hate that it hinders my anti grief plugins...
     
  13. Offline

    Juze

    Oh, I can see why. My plugin cancels the event of breaking blocks and the plugin sets the block as air, that's why. See if I can come up with a solution.

    Anyone tested for WorldGuard (protection) compatibility?

    v1.1 released:
    • Changed Permissions from dropplugin.* to DropPlugin.*
    • OP check works again (thanks @t3hk0d3 !)
    • Added support for grass and mobspawners
    • Code cleanup

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

    kaasinees

    Will placing mob spawners make the spawner work? I remember that doing that wont work...
     
  15. Offline

    austin101

    Awesome that would be wonderful!
     
  16. Offline

    Juze

    Nope, you're going to need to use some other plugin/command to do that, such as /mspawn.

    I just noticed that v1.1 has a bug with config and the plugin uses default config instead. This was because I didn't spend too much time on testing this time and the config handling code was changed in v1.1. Please use v1.0 instead until I get v1.2 out soon.

    http://dl.dropbox.com/u/18028516/DropPlugin/v1.0/DropPlugin.jar

    v1.2 and v1.2.1 released, see changelog. Please report any bugs and tell me if I fixed the BigBrother conflict.

    Please reconfigure your config, the config now uses YAML and the old config is incompatible!

    And v1.2.2 released with cakes.

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

    MCAndi

    doesnt an ore usually drop an ore and not an ingot?
     
  18. Offline

    wassilij

    "Mobspawner - Drop a mobspawner!"
    Yes it dropped a Mobspawner .. but a Pig Mobspawner .. no Mob Mobspawner :p

    I have the same problem :(

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

    austin101

    Well I got around to testing to see if greif alert / bb compatible.

    My results works perfect with Greif Alert
    Does NOT work with bigbrother.

    also you didn't list a permission in your first post "DropPlugin.drop.tnt" :)
     
  20. Offline

    Juze

    @austin101 : Thanks for these, I am probably unable to fix the BigBrother issue due the way BigBrother listens to blocks, you may want to report that to the BigBrother author and see if he can come up with a fix.

    @wassilij : As commented above, you still need another plugin to change what the spawner spawns, such as /mspawn command.

    @MCAndi : To clarify, for example, coal ore drops coal ingot by default. This changes it to coal ore. :) You also gave me an idea to change gold ore to drop gold ingots and iron ore to drop iron ingots, but I'm focusing on doing a reload command for v1.3.

    EDIT: v1.3 will have (hopefully) all of these:
    • Snow v1.2.3
    • Clay v1.2.3
    • Flint v1.2.3
    • Boat
    • Ingots v1.2.3
    • /dropplugin reload
    • /dp reload
    • Automatic config updates
    • Fix plugin reload and disable
    If you got any more suggestions, please let me know!
     
  21. Offline

    woodzy

    heres one have an OP command being something like
    /drop normal <-normal drops
    /drop config <-config based drops
    /drop random <- just to troll players for a day no drops makes since its just random lol
     
  22. Offline

    Juze

    Normal drops, I'm not sure, you could aswell disable the plugin, that's buggy at the moment but will try to fix it in v1.3 too.

    Config drops, that's why I got config reload coming.

    Random drops, nope, seems quite difficult and doesn't suit this plugin very well, the purpose of this plugin is to fix the drops, not to "break" them.

    Okay, I rushed with a release, those who want snow blocks to drop snow instead of balls, v1.2.3 has been released for you. I'd consider such "large" update as v1.3 but already promised what v1.3 will have.

    v1.2.3 does NOT include config reload or anything else, only new drops.

    I want to ask you all, should I remove the TNT drop? I will highly likely remove it in v1.3 as I've already replaced the functionality in DynaHate. I doubt too many users will even use the TNT drop thing. If you do, tell me though.

    That also questions, should I remove the grass/mobspawner/ice/etc drops from this plugin and put them as a seperate download to keep it as lightweight as possible?

    Also, I'm leaving tomorrow so no updates until this Sunday or something.

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

    DragonSupremacy

    Well, tbh I don't see why it's a problem as-is to have one plugin for all the items that normally don't drop the items requested.

    If you do decide to split or slim it down, I'd personally like to see one for stairs/glass/bookcases/boats only, since those don't return the exact material in vanilla Minecraft
     
  24. Offline

    Juze

    v1.2.4 released, added support for logs (and I believe only normal logs, no birch or that, didn't test) as suggested by @ThreeDGuy .

    @DragonSupremacy : I was thinking of the same, leave the rest "useless" stuff like grass into an expansion plugin, call it DropPlugin Extras.

    DropPlugin could also be the full featured pack and the plugin with boats etc only as DropPlugin Lite, as a minimalist pack. Much like BorderGuard and BorderGuard Lite, for example.
     
  25. Offline

    Juze

    I am back from a holiday. :)

    I've discussed a bit with @ChrizC and we've decided to hit up this plugin together. That means ChrizC is now collaborating and adding features to this plugin with me. :D

    And yes, we're both new to Java. :p
     
  26. Offline

    ChrizC

    I'm not that new! Look at how many plugins I have released :D

    Also, relating to the plugin:
    I've done quite a bit of dev work so far and have fixed/added the following things:
    • * Changed config layout. This will be documented in the main post when 1.3 is released
    • + Added config file checker - checks if config file is missing any nodes and checks if the config file is of the old format. If it's of the old format, it reformats it.
    • + Added boat drops when boat is destroyed by player.
    Note: None of these changes are currently available. These changes will be included in v1.3
    What I have in the pipeline:
    • * When config file is reformatted, copy the old settings into the new file.
    • * Multi-world config.
    Chris :cool:
     
  27. Offline

    Taco

    Is the source based on anything? It looks similar to a plugin (BukkitOfBlocks) I dropped a while back. I left it free to use and abuse, so I'm not trying to yell at you for anything, I'm just curious.
     
  28. Offline

    ChrizC

    As far as I know, all of this plugin is original code, we've probably just approached it the same way you did.
    I can't speak for @Juze though. That's just for me.

    Chris :cool:
     
  29. Offline

    Juze

    I have not used any part of your code, this was inspired by Robin's GlassPlugin. We may have the same approach though, which is common with block modifiers.
     
  30. Offline

    Taco

    The approach is almost the same actually. I was just wondering though, no big deal. :p
     

Share This Page