[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

    G1R Productions

    Will this plugin mess with plugins like MCMMO and Creaturebox?
     
  3. Offline

    NuxlyStardust

    I've been running it on a server with CreatureBox and everything worked fine. As long as you don't define a section for the spawner block it will be ok, there's no reason to do that anyway.

    I don't know for MCMMO but I don't remember any issue being reported so it's likely ok.
     
  4. Offline

    G1R Productions

    Alright good, for MCMMO it changes the drops on dirt so i just wont mess with dirt on your plugin. Btw I recommend for people that use the new Spider web item to make it drop string or something if you don't want normal players to have it.
     
  5. Offline

    cholo71796

    Will you be adding damage support? I'd like to up the rate of wheat from crops, but I need to set the damage value to seven so it only changes the grown ones. If I don't, then a bunch of wheat drops from just-planted crops.
     
  6. Offline

    G1R Productions

    Yes id like this to but also is it possible to increase the amount of time it takes to break a block?
     
  7. Offline

    NuxlyStardust

    I'm currently working on that feature. It's gonna take some time because of exams, I can't tell when it will be ready. Sorry for the inconvenience.

    Nop, this not part of what my plugin is supposed to do. It just takes care of making different items drop when blocks are destroyed, nothing else. I suggest you look for another plugin that does it.
     
  8. Offline

    NuxlyStardust

    New version is out !
    Sorry for the time, I've been busy.

    I finally fixed the config file structure, and added some of the things you requested: ability to set the damage value for blocks and tools, and support for CraftbukkitUpToDate (I've just submitted the link so it should be working soon).

    I haven't yet fixed the chance system and added the iConomy support, I'll be working on that. But I have other projects of plugins to start so they will be the main priority for a while. Of course I'll stick around to fix the problems with that plugin and keep up with the RB.

    I've rewritten most of the plugin from scratches, though I'm still not quite satisfied with the design. That means there might be some bugs, so don't forget to report them here.

    Thank you all for your interest :)

    PS - We got a Wiki now: https://github.com/NuxlyStardust/DropEdit/wiki
     
  9. Offline

    Zazamari

    Code:
    22:21:09 [WARNING] Failed to handle packet: java.lang.NullPointerException
    java.lang.NullPointerException
            at net.minecraft.server.ItemStack.d(ItemStack.java:95)
            at net.minecraft.server.ItemStack.f(ItemStack.java:103)
            at net.minecraft.server.InventoryPlayer.canHold(InventoryPlayer.java:124)
            at net.minecraft.server.EntityItem.b(EntityItem.java:205)
            at net.minecraft.server.EntityHuman.i(EntityHuman.java:212)
            at net.minecraft.server.EntityHuman.u(EntityHuman.java:204)
            at net.minecraft.server.EntityPlayer.u(EntityPlayer.java:203)
            at net.minecraft.server.EntityLiving.p_(EntityLiving.java:231)
            at net.minecraft.server.EntityHuman.p_(EntityHuman.java:90)
            at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:160)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:272)
            at net.minecraft.server.Packet10Flying.a(SourceFile:126)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    
    Happens when someone breaks a leaf block and then that person cannot get back in till i delete their player file in the world directory.

    my config:

    Code:
    items:
    
        Leaves:
    
           id:18
    
    break:
    
    
    
        '18,0':
    
            '*':
    
                - Leaves
     
  10. Offline

    NuxlyStardust

    It's a problem with your config file. You should add a space between "id:" and "18", and it will work.
    Still it's weird that it makes the whole thing crash, I'll take a closer look at this problem.

    Code:
    items:
        Leaves:
           id: 18
    Problem fixed. You still have to make sure your YAML syntax is right but the client won't crash if it isn't.

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

    Tomok

    Hey, i want that leaves drop RedApples, GoldenApples, CocoaBeans and the specific Sapling (Birch,Pine,normal).
    Here is my code:

    Show Spoiler

    Code:
    items:
    	Sapling:
            id: 6
            chance: 70
    	BirchSapling:
            id: 6,2
            chance: 70
    	PineSapling:
            id: 6,1
            chance: 70
    	GoldenApple:
            id: 322
            chance: 1
    
    	RedApple:
            id: 260
            chance: 9
    
    	CocoaBeans:
            id: 351
            durability: 3
            chance: 20
    
    break:
        '18':
            '*':
                	-Sapling
    		-GoldenApple
    		-RedApple
    		-CocoaBeans
        '18,1':
            '*':
                	-PineSapling
    		-GoldenApple
    		-RedApple
    		-CocoaBeans
    
        '18,2':
            '*':
                	-BirchSapling
    		-GoldenApple
    		-RedApple
    		-CocoaBeans
    decay:
        '18':
            '*':
                	-Sapling
    		-GoldenApple
    		-RedApple
    		-CocoaBeans
        '18,1':
            '*':
                	-PineSapling
    		-GoldenApple
    		-RedApple
    		-CocoaBeans
    
        '18,2':
            '*':
                	-BirchSapling
    		-GoldenApple
    		-RedApple
    		-CocoaBeans
    burn:
        '18':
            '*':
                	-Sapling
    		-GoldenApple
    		-RedApple
    		-CocoaBeans
        '18,1':
            '*':
                	-PineSapling
    		-GoldenApple
    		-RedApple
    		-CocoaBeans
    
        '18,2':
            '*':
                	-BirchSapling
    		-GoldenApple
    		-RedApple
    		-CocoaBeans
    
    



    Here is the error from my screenlog:

    Show Spoiler

    Code:
    18:17:09 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-700-gf3ae4c3-b733jnks (MC: 1.5_02)
    >
    18:17:09 [INFO] Preparing level "world"
    >
    18:17:09 [INFO] Preparing start region
    >
    18:17:10 [SEVERE] Could not load 'plugins/DropEdit.jar' in folder 'plugins':
    while scanning for the next token
    found character         '\t' that cannot start any token
     in "<reader>", line 2, column 1:
            Sapling:
        ^
    
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:360)
            at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:183)
            at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingValue.produce(ParserImpl.java:592)
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:132)
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
            at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
            at org.bukkit.util.config.Configuration.load(Configuration.java:73)
            at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:158)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:140)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:160)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:108)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:85)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    >
    18:17:10 [INFO] Lockette version 1.3.6 is being enabled!  Yay!  (Core version 1.0)
    >
    18:17:10 [INFO] Lockette: Detected craftbukkit build [733] ok.
    >
    18:17:10 [INFO] Lockette: Using ops file for admin permissions.
    >
    18:17:10 [INFO] Lockette: Ready to protect your containers.
    >
    18:17:10 [INFO] Chat v 0.1 is enabled
    >
    18:17:10 [INFO] Warpz0r version 1.2.2 is enabled
    >
    18:17:10 [INFO] BOSEconomy: Could not locate Phoenix Permissions plugin. Option 'phoenix-permissions' will not be used.
    >
    18:17:10 [INFO] BOSEconomy 0.6.2 enabled.
    >
    18:17:10 [INFO] [iConomyChestShop] version 2.52 initialized!
    >
    18:17:10 [INFO] [iConomyChestShop] Lockette version 1.3.6 loaded.
    >
    18:17:10 [INFO] [iConomyChestShop] BOSEconomy version 0.6.2 loaded.
    >
    18:17:10 [INFO] TreeAssist STARTED
    >
    18:17:10 [INFO] [FishPeople]  version 1.3 is enabled!
    >
    18:17:10 [INFO] Zeus configuration loaded.
    >
    18:17:10 [INFO] Permission system not detected, defaulting to OP
    >
    18:17:10 [INFO] Zeus version 0.3 has started, the gods are at your will
    >
    18:17:10 [INFO] [RealShop] load dependency : BOSEconomy ok
    >
    18:17:10 [INFO] [RealShop] Uses BOSEconomy plugin (/econ commands) as economy system
    >
    18:17:10 [INFO] [RealShop] version [0.593] (tickleman) loaded
    >
    18:17:10 [INFO] [SlowHealth] version [3.0.1] (actruncale) is loaded.
    >
    18:17:10 [INFO] [SlowHealth] Permission system not detected, everyone gets heals!
    >
    18:17:10 [INFO] Done (0.073s)! For help, type "help" or "?"
    >
    
    



    The Plugins i'm using are inside the screenlog.

    Hope you can help me =)
     
  12. Offline

    NuxlyStardust

    Bad YAML syntax. You should never use tabs to align text. Use 4 spaces instead. And don't forget to indent the fields in the items block:

    Code:
    items:
        Sapling:
            id: 6
    
     
  13. Offline

    Tomok

    Better like this?

    I've replace the tabs with spaces, but it doesn't work at all. I think i'm to stupid for this :(

    Show Spoiler

    Code:
    items:
        Sapling:
            id: 6
            chance: 70
        BirchSapling:
            id: 6,2
            chance: 70
        PineSapling:
            id: 6,1
            chance: 70
        GoldenApple:
            id: 322
            chance: 1
    
        RedApple:
            id: 260
            chance: 9
    
        CocoaBeans:
            id: 351
            durability: 3
            chance: 20
    
    break:
        '18':
            '*':
                - Sapling
                - GoldenApple
                - RedApple
                - CocoaBeans
        '18,1':
            '*':
                - PineSapling
                - GoldenApple
                - RedApple
                - CocoaBeans
    
        '18,2':
            '*':
                - BirchSapling
                - GoldenApple
                - RedApple
                - CocoaBeans
    decay:
        '18':
            '*':
                - Sapling
                - GoldenApple
                - RedApple
                - CocoaBeans
        '18,1':
            '*':
                - PineSapling
                -GoldenApple
                -RedApple
                -CocoaBeans
    
        '18,2':
            '*':
                - BirchSapling
                - GoldenApple
                - RedApple
                - CocoaBeans
    burn:
        '18':
            '*':
                - Sapling
                - GoldenApple
                - RedApple
                - CocoaBeans
        '18,1':
            '*':
                - PineSapling
                - GoldenApple
                - RedApple
                - CocoaBeans
    
        '18,2':
            '*':
                - BirchSapling
                - GoldenApple
                - RedApple
                - CocoaBeans
    
    
     
  14. Offline

    NuxlyStardust

    From a quick glance I see two problems:
    In the "decay" block, you forgot to add a space between the "-" and the name of the items, in 18,1.

    The other problem is here:
    Code:
        BirchSapling:
            id: 6,2
            chance: 70
    
    6,2 is not an item, this is what you want to do:

    Code:
        BirchSapling:
            id: 6
            durability: 2
            chance: 70
    
    Same for PineSapling.

    I also suggest that you lower the percentage of chance for the saplings, because when all the leaves of a tree decay it might slow the server. That's a lot of items dropped at the same time.

    If you're still having problems please join the part of the log with the exception because it says where the error is.
     
  15. Offline

    Tomok

    Well, now it works, but only if i break the leaves manually. Where is the problem now?

    Here the code:

    Code:
    items:
        Sapling:
            id: 6
            chance: 70
        BirchSapling:
            id: 6
            durability: 2
            chance: 70
        PineSapling:
            id: 6
            durability: 1
            chance: 70
        GoldenApple:
            id: 322
            chance: 1
    
        RedApple:
            id: 260
            chance: 9
    
        CocoaBeans:
            id: 351
            durability: 3
            chance: 20
    
    break:
        '18':
            '*':
                - Sapling
                - GoldenApple
                - RedApple
                - CocoaBeans
        '18,1':
            '*':
                - PineSapling
                - GoldenApple
                - RedApple
                - CocoaBeans
    
        '18,2':
            '*':
                - BirchSapling
                - GoldenApple
                - RedApple
                - CocoaBeans
    decay:
        '18':
            '*':
                - Sapling
                - GoldenApple
                - RedApple
                - CocoaBeans
        '18,1':
            '*':
                - PineSapling
                - GoldenApple
                - RedApple
                - CocoaBeans
    
        '18,2':
            '*':
                - BirchSapling
                - GoldenApple
                - RedApple
                - CocoaBeans
    burn:
        '18':
            '*':
                - Sapling
                - GoldenApple
                - RedApple
                - CocoaBeans
        '18,1':
            '*':
                - PineSapling
                - GoldenApple
                - RedApple
                - CocoaBeans
    
        '18,2':
            '*':
                - BirchSapling
                - GoldenApple
                - RedApple
                - CocoaBeans
    
     
  16. Offline

    NuxlyStardust

    You should not define a tool for burn and decay:

    Code:
    decay:
        '18':
            - Sapling
            - GoldenApple
            - RedApple
            - CocoaBeans
    
    Simply remove '*': and re-align the text.
     
  17. Offline

    JacKlink01

    MAJOR BUG: If you use WorldGuard or any other plugin that protects blocks, it WILL NOT protect blocks that have had their DropEdited! We have a protected spawn area and we had a guest come to the server and remove ALL of the glowstone, because we have it set to drop glowstone. They had no permissions, yet they could break glowstone while we used this plugin. That area was also protected by WG.

    Sadly, we cannot use this plugin on our server, until this is fixed. Otherwise, I love it :)
     
  18. Offline

    NuxlyStardust

    A similar problem was reported with Residence but the fact is I really don't see how I could solve it. I'm gonna contact the WorldGuard developer to see if he has an idea about that.
     
  19. Offline

    lotrein

    Code:
    items:
    name_264:
    id: 264
    min: 0
    max: 1
    chance: 100
    groups:
    - race_h
    min: 0
    max: 1
    chance: 30
    groups:
    - race_d
    will such thing work? here i wanted to make the chances of item drop for each race. Please, dont tell me i need to make unique to each race T__T

    Also, dont mind the spaces, i've already fixed that

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

    NuxlyStardust

    The name of the event is "break", not "breaks"
    Also, you defined the same properties several time for the same item, you need to create one item for each group if you want different chances for each of them. It's not long to do, but it makes the file bigger indeed, I might fix that later if I work on that project again.
    One last problem is the spaces. You need to indent each group by four spaces more than the container:

    Code:
    items:
        name_264:
            id: 264
            min: 0
            max: 1
            chance: 100
            groups:
                - race_h
    If you name your items and groups more explicitly it will be easier for you to read.

    Hope it helped.
     
  21. Offline

    lotrein

    Thx, you solved the problem, but created new hours of typing :D we'll need to define each block of the game to each group...
     
  22. Offline

    enelar

    Lol nope, i created script)

    324 strings in items and 1120 strings in break.. i dont think that we need easy_human_reading names)
     
  23. Offline

    NuxlyStardust

    Wow... that's a lot of stuff. Glad to see it's useful :)
    Is it working well with so much data?

    Let me know if you need anything else :)
     
  24. Offline

    King_Koopa

    Blah, how do I get this so I can get, for example, cocoa beans from hoeing grass with a hoe? Hoe + grass, farmland do not seem to be working for me....or maybe I am doing it wrong.
     
  25. Offline

    NuxlyStardust

    Please post your config file so I can tell you what's wrong.
     
  26. Offline

    King_Koopa

    items:
    CocoaBeans:
    id: 351
    min: 1
    max: 2
    chance: 10

    break:
    # Grass + Gold Hoe -> CocoaBeans
    '2':
    '294':
    - CocoaBeans
     
  27. Offline

    NuxlyStardust

    It doesn't work because you didn't align the data correctly. You should also set the durability to 3 in order to get cocoa beans.

    Code:
    items:
        CocoaBeans:
            id: 351
            durability: 3
            min: 1
            max: 2
            chance: 10
    
    
    break:
        # Grass + Gold Hoe -> CocoaBeans
        '2':
            '294':
                - CocoaBeans
    
    It will give your cocoa beans when you destroy a block of grass, not when you right click it with the hoe. I don't think it can be done, there's no event for that.
     
  28. Offline

    enelar

    testing.
    "Overload based" config. Example here http://pastebin.com/iYX26XxK
    I think this give more freedom for users, and cutting config file.
    For example i can sort my data, then create config.

    Thanks for kind of awesome plugin)
     
  29. Offline

    NuxlyStardust

    I think it would be quite confusing for certain people, the += part seems too nerdy. But the biggest problem is that it is not permitted by the YAML specs.

    Here's something different:
    Code:
    items:
        itemName:
            admins:
                id: 1
                min: 5
                max: 8
            players:
                id: 1
                min: 1
                max: 3
    What about this?
     
  30. Offline

    enelar

    I think better something like this:

    Code:
    items:
        itemName:
            id: 1 # item id
            min: 1 #default values
            max: 2 #default values
            chance: 50 #default values
            admins:
              chance: 100 #overload values
            players:
                max: 3 #overload values
            dummy: # group with all values default
    
    and if it possibly, add global default values - for all items

    P.S sorry for my bad eng.
     
  31. Offline

    NuxlyStardust

    Good idea, I'll think about that.
    Don't expect it anytime soon though, because I don't have much time to work on that plugin at the moment.

    Still it's better than it used to be, you should have seen the older versions: there wasn't a separate section where you could name the items, you had to rewrite the same properties for each possible event :p
     

Share This Page