[INACTIVE][ADMIN/GEN] DropEdit v1.4.4 - Get different drops when destroying blocks [818]

Discussion in 'Inactive/Unsupported Plugins' started by NuxlyStardust, Apr 1, 2011.

  1. Offline

    NuxlyStardust

    DropEdit - Get different drops when destroying blocks
    Version: v1.4.4 (05/21/2011)
    Tested on: 798


    This is my first plugin. It allows you to define what your players get when
    they destroy certain types of blocks with a given tool.

    A good use for it is to allow your players to get sponge or nether blocks
    without having to use portals.

    This plugin was inspired by Jerry's NetherBlocks. I wanted the ability to
    add more blocks without having to edit the code every time. If you only want to use blocks from the Nether on a server where it can't be accessed, I recommend you to use his plugin instead, which will be more lightweight as its use is more specific.

    I would like to thank sk89q for his help, and all of you for your support and for reporting bugs.

    Features:
    • Make anything drop from broken or burned blocks, or decaying leaves.
    • A random number of items can be dropped.
    • You can define what percentage of chance players have to get a certain item.
    • Support for wool color and dye type.
    • Support for Permissions.
    • Support for CraftbukkitUpToDate.
    • Compatible with WorldGuard.
    How to configure:
    All details are given on the Wiki. A sample config file is joined with the plugin.

    Example:
    Code:
    items:
        GlowstoneDust:
            id: 348
            min: 1
            max: 3
            chance : 100
            groups:
                - *
    
    break:
        '2':
            '284':
                - GlowstoneDust
    With this setup, if you destroy (break) a grass ('2') block with a
    gold shovel ('284'), you will always (chance: 100) get
    1 to 3 (min: 1; max: 3) of glowstone dust (id: 348).

    For each item, only the "id" key is required, all other are optionals.

    Event
    The event here is "break". You can also use "burn", and "decay". These last two don't require a tool, so the list of items must appear in the block's section.

    Event > Block
    The block here is '2'. You can set it to '*', to refer to any block.
    You can also restrict the event to certain damage value by separating the two values with a comma. For example, '35,11' is a blue wool block.

    Event > Tool
    If you set the tool to * (or '*', both will work), the specified item will be dropped regardless of the tool used to destroy the block.
    Just like with the block, you can set a damage value.

    Item > Durability
    "durability" is optional (Default: 1). It allows you to select the wool color of type of dye
    you want.

    Item > Groups
    "groups" is optional (Default: '*'). It allows to define custom drops that will apply only for given groups. You need the Permissions plugin for that. This feature has been tested on Permissions 2.5.5.
    If Permissions is not installed, this field will be ignored.
    A list is expected, so you should use the list notation (as showed in the example above) even if you want to specify only one group.

    Item > Message
    "message" is optional (Default: none). It allows you to define a message that will be sent to the player. I strongly recommend that you use it only for very rare items, and only for the "break" event. Otherwise, the chat will overflow with messages from the plugin.

    Download:
    Important: The configuration file structure has changed in v1.4.0, do not forget to update your config.yml file.

    Latest version - Source Code - Wiki
    Old versions: 1.4.3 - 1.4.2 - 1.4.1 - 1.4.0 - 1.3 - 1.2 - 1.1

    Permissions Plugin

    Getting help & reporting problems:
    I 'll be glad to help you if you're having difficulties using my plugin, just post your questions in this thread.
    I will be able to help you faster if you provide the following:
    • A precise description of your problem, and explanations on what you are trying to do.
    • Your config file (if it is too long to post here, use codepaste.net).
    • A quick list of the other plugins you are using. Certain problems can be caused by conflicts between plugins.
    • Any particular output of my plugin visible in the logs (exceptions or other messages).
    Before you post, make sure that you are using the latest version of my plugin. The most recent version is indicated at the top of this post. I can't offer support for old versions. Also check that you are using the Bukkit's latest recommended build.

    Known Issues:
    • You will not always get items from burning blocks because they may be destroyed by the fire.
    • Exceptions will be thrown if the Permissions config file doesn't contain any group. This is a problem in the Permissions plugin, I can't do anything about it.
    • You can't use it to get spawners when you break them. If you need to work with spawners, I suggest CreatureBox.
    Todo:
    I can't tell for sure when the next version will be available.
    • iConomy support
    Information for developers:
    Used events: BLOCK_BREAK (High), BLOCK_BURN (High), LEAVES_DECAY (High)
    This plugin will not cancel any event.
    You can simulate any of these events using the appropriate methods in the plugin class (breakBlock, burnBlock, blockDecays).

    Changelog:
    Version 1.4.4 (05/21/2011)
    • Added "message" parameter, be careful with it (Requested by m5k).
    Version 1.4.3 (05/05/2011)
    • Fixed potential compatibility problem with the next versions of WorldGuard (thanks to sk89q)
    • Added methods to the main plugin class to allow other plugins to interact with DropEdit.
    Version 1.4.2 (05/02/2011)
    • Fixed compatibility problems with WorldGuard (Reported by JacKlink01).
    • Fixed potential compatibility problems with other plugins, Residence is likely working now.
    Version 1.4.1 (04/27/2011)
    • Fixed a bug that caused the Minecraft client to crash if the config file contained invalid YAML syntax. Yes, really.
    • Works with 733.
    Version 1.4.0 (04/24/2011)
    • Changed config file structure.
    • Added leaves decay event.
    • Added ability to restrict blocks and tools to a certain damage value.
    • Added support for CraftbukkitUpToDate (will be ready soon).
    • Added properly working way to make multiple items drop for the same event.
    • Tested on 684. Works.
    • Created a Wiki: https://github.com/NuxlyStardust/DropEdit/wiki
    Version 1.3.4 (04/14/2011)
    • Updated for 677.
    Version 1.3.3 (04/12/2011)
    • Fixed a bug that prevented the plugin from dropping multiple items of the same type.
    Version 1.3.2 (04/09/2011)
    • Fixed a bug that caused undefined blocks not to drop anything. (Reported by DjinnRutger)
    Version 1.3.1 (04/08/2011)
    • Fixed a bug that caused the iron hoe not to get damage when used to break blocks.
    • Fixed a bug that prevented the plugin from dropping multiple different items.
    • The config file structure has changed ! Make sure to update your file. This structure is temporary and will be replaced by a more tidy one in the next version.
    Version 1.3.0 (04/05/2011)
    • Added ability to make block drops a certain item regardless of the tool used. (Idea by Andrew0085)
    • Added ability to restrict drops to more than one group. (Requested by Andrew0085 and SpyDaniel)
      • Replaced "group" by "groups" in the configuration, do not forget to update your file !
    Version 1.2.1 (04/03/2011)
    • Fixed a bug that caused hoes to be unbreakable. (Reported by Leemur)
    Version 1.2.0 (04/03/2011)
    • Added ability to restrict drops to certain groups. Uses the Permissions plugin.
    Version 1.1.0 (04/02/2011)
    • Added ability to select what item is dropped when a block is destroyed by fire.
    • Added support for dyes/wool color.
    Version 1.0.1 (04/02/2011)
    • Renamed project to DropEdit.
    Version 1.0.0 (04/01/2011)
    • First build.
    _______________________________
    [​IMG] - Thanks a lot for your support !
     
  2. Offline

    Steve Cole

    not really your fault here is the config file i used that caused the crash.
    Code:
    drops:
        '1':
            '*':
                drop: 1,2
    the codes below resulted in stone dropping only grass blocks.
    Code:
    drops:
        '1':
            '*':
                drop: 1
    
            '*':
                drop: 2
    Code:
    drops:
    '1'
            '*':
                drop: 1
                drop: 2
    
     
  3. Offline

    NuxlyStardust

    I'm aware of that issue, gonna fix that tomorrow :)
     
  4. Offline

    Shooty

    Can you add iConomy Support :) ?
     
  5. Offline

    NuxlyStardust

    I haven't looked at that plugin yet, what kind of support do you have in mind?
     
  6. Offline

    Shooty

    Drops' coins when i broke a block
     
  7. Offline

    NuxlyStardust

    New build available. I fixed those issues you guys told me about.
    I wanted to fix those problems quickly so you could use the plugin asap, which ended up in a new (and quite messy) config file structure. Don't forget to update your config.yml file before launching the server.

    In the next version, I will rethink the design of the app, make the config file more tidy, and consider the iConomy support suggested above. I will also try to make my plugin more compatible with others so you don't get annoyed by conflicts.
     
  8. Offline

    Mighty Mackinac

    Hey if you could add support for Craftbukkituptodate that would be awesome! I appreciate your awesome work!
     
  9. Offline

    NuxlyStardust

    Added to my list of things to add to the next version :)
    Thanks for your comment
     
  10. Offline

    DjinnRutger

    This looks cool but for some reason when i load it. now nothing drops from anything???
     
  11. Offline

    NuxlyStardust

    Fixed, thanks for reporting :)
     
  12. Offline

    deadlock989

    I wonder ... can this be used to fix the cactus farming exploit? If I set it so that * -> cactus drops nothing, then list all the tools and get them to drop one cactus block?
     
  13. Offline

    NuxlyStardust

    You mean the infinite doors exploit?
    I'm not too sure, needs to be tested.
     
  14. Offline

    deadlock989

  15. Offline

    NuxlyStardust

    Oh I wouldn't consider it an exploit. But anyway, I don't think my plugin can deal with it. Unless the block is burned, there has to be a player involved in the event.
     
  16. Offline

    Leemur

    good update, but..
    giving 2 different items from one block doesn't work.
    I tried in several cases - nothing.
     
  17. Offline

    NuxlyStardust

    Weird, my tests worked pretty well.
    Could you please provide me with your config file and a list of plugins you're using?

    I'll soon be working on my new versions which should be easier to configure and more able to deal with conflicts with other plugins. Keep sending your requests for features/fixes :)
     
  18. Offline

    Leemur

    '17':
    '286':
    '17':
    min: 1
    max: 1
    durability: 1
    chance: 100
    '17':
    min: 1
    max: 3
    durability: 2
    chance: 30

    i tried and 17 with 20 (for example) doesn't work..
    I don't know if the plugin works with Residence Plugin, i've not tested yet..
    But with levelcraft plugin doesn't work.
     
  19. Offline

    NuxlyStardust

    Ok I see what's wrong. It's again something with the YAML parser. You have two '17': blocks so the parser only takes the last one into account. If you swap them you will get redwood instead.
    So you cannot drop the same item twice like this. It's because of the YAML specification and there's really nothing I can do until I change the whole thing in the next version (I'll work on it this weekend if I have the time).

    Until then, there is a workaround:
    The item numbers are encoded as strings in the file and converted to integers internally in the plugin, so you can add a 0 to have different names, it will work.

    Code:
    drops:
        '17':
            '286':
                '17':
                    min: 1
                    max: 1
                    durability: 1
                    chance: 100
                '017':
                    min: 1
                    max: 3
                    durability: 2
                    chance: 30
    And if you need more blocks for the same item, just add one more zero everytime.
    Sorry for the inconvenience.
     
  20. Offline

    Leemur

    @NuxlyStardust
    not.. doesn't work. I tried how you sayed....
    '17' and '017' doesnt work
    '17' and '20' doesnt work, too
    :(
     
  21. Offline

    NuxlyStardust

    It was working on my local server, and now I don't understand why it did. There was actually something wrong in my code, a beginner mistake.
    Just download the new version and use the '017' workaround.

    This time, it will work :)

    Thanks a lot for your patience :p
     
  22. Offline

    Leemur

    ok fine, now works this..
    but..
    how I can to set durability for the item that will be destroyed?
    for example
    I tried

    Code:
        '17':
        durability: 0
            '286':
                '17':
                    min: 1
                    max: 1
                    durability: 0
                    chance: 100
                '017':
                    min: 3
                    max: 3
                    durability: 0
                    chance: 60
        '017':
        durability: 1
            '286':
                '17':
                    min: 1
                    max: 1
                    durability: 1
                    chance: 100
                '017':
                    min: 3
                    max: 3
                    durability: 1
                    chance: 60
        '0017':
        durability: 2
            '286':
                '17':
                    min: 1
                    max: 1
                    durability: 2
                    chance: 100
                '017':
                    min: 3
                    max: 3
                    durability: 2
                    chance: 60
    doesn't work
     
  23. Offline

    NuxlyStardust

    oh I see. Well my plugin isn't able to do this for now, but I will add this feature in the next version. Can't promise any date, I'm quite busy these days, but I'll work on that :)
     
  24. Offline

    ShockBuddy

    I settet up: Destroy Snow_layer with 0 (Hand) drop Snowball, and it works :D

    Niceee, keep up the work on it!

    [diamond][diamond][diamond][diamond] (you get the 5th [diamond] if you make it easier to Add an Item Drop)

    Example

    [Itemdrop]
    ItemdropID: (The ID of that Drop EXAMPLE: DR001)
    Block: (Block that is needed to get Drop)
    Tool: (Tool used to get Drop) (OPTIONAL) (Seen too late that im able to put * to turn off :D)
    Drop: (ID´s of the Item that Drops "," for more than one Drop)
    Minimum of Drops: (Set the Minimum of Items that can Drop)
    Maximum of Drops: set the Maximum of Items that can Drop)
    Percentage Chance: (% 1-100 to get an Item)
    Comment: (The Admin can Left a Message of what this Entry do!)


    Everything in this XY: Z Format.


    (Im German, dont laught at my English!)
     
  25. Offline

    NuxlyStardust

    Thanks a lot.
    You're right that it's not quite easy to add drops right now, but I'll change that in the next version.
     
  26. Offline

    Juze

    Please update to latest RB for releases.
     
  27. Offline

    NuxlyStardust

    Done :)
     
  28. Offline

    Juze

    Done :)
     
  29. Offline

    NuxlyStardust

    Wow, thanks for the speed :p
     
  30. Why can't any of these be done with commands?
     
  31. Offline

    NuxlyStardust

    You mean configuring the plugin through commands?
    Are you sure it would be any easier?
     

Share This Page