[MISC] WheatHeal v2.0.1- Heal your friends by hitting them with Food! [1.1-R4]

Discussion in 'Inactive/Unsupported Plugins' started by Numenorean95, Jun 25, 2011.

  1. Offline

    Numenorean95

    Wheat Heal
    Current Version: 2.0.1​

    Ever wished you could heal your friends? Now you can with WheatHeal! Left click any player with wheat (or anything else), and they will be healed (by default) half a heart, while costing you one piece of wheat. Now with customisable values, ingame commands, permissions support, and Tools!
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    News/Announcements:

    Version 2.0.1 has been released fixing the null pointer error from 2.0 .

    WheatHeal version 2.o is out!
    With the addition of Tools, and support for Minecraft 1.8, alot of changes have been added with this update.

    We now are on BukkitDev! Go to http://dev.bukkit.org/server-mods/wheatheal/ to get help, information, and get alternate links to downloads.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Installation:
    As always, put WheatHeal.jar in your plugins directory, and start Bukkit. It should work without any initial configuration. To change how much each food heals, however, edit WheatHeal/config.yml in your plugins folder. there you can also choose which foods are enabled, as well as which Permissions plugin to use. An example Configuration:
    Show Spoiler

    Code:
    # WheatHeal Configuration File
    #
    # Foods each have two values: healValue and enable
    # healValue decides how much a person is healed by (yes it can be negative...)
    # and enable is whether it will trigger the healing event.
    # If set to false, it can be used like normal, hitting people to do damage.
    #
    # All heal values are in half hearts, therefore 10 equals five hearts.
    #
    # Remember, YAML rules apply; Do not use Tabs!
    #
    #
    
    Foods:
        Sugar:
            healValue: 3
            enable: true
        Bread:
            healValue: 3
            enable: true
        Cake:
            healValue: 10
            enable: true
        Milk:
            healValue: 7
            enable: true
        Cookie:
            healValue: 7
            enable: true
        [U]Sugarcane[/U]:
            healValue: 2
            enable: true
        Apple:
            healValue: 5
            enable: true
        RawPork:
            healValue: 3
            enable: true
        RawFish:
            healValue: 4
            enable: true
        GoldenApple:
            healValue: 20
            enable: true
        Egg:
            healValue: 4
            enable: true
        MushroomStew:
            healValue: 10
            enable: true
        CookedFish:
            healValue: 8
            enable: true
        BrownMushroom:
            healValue: 6
            enable: true
        RedMushroom:
            healValue: 7
            enable: true
        Wheat:
            healValue: 1
            selfHeal: true
            enable: true
        CookedPork:
            healValue: 8
            enable: true
    
    # Decides how much health a player can be healed (yes, in such a way people can get more than 20 health)
    MaxHealth: 20
    
    #NOT IMPLEMENTED
    # Whether to heal people directly or fill the food bar. False designates food bar filling.
    DirectHeal: false
    
    # Which permissions to use. Uses Permissions by default, set to true for bukkitPermissions
    Permissions:
        useBukkit: false
    
    # NOT YET IMPLEMENTED:
    #
    # Custom Tools:
    # Here you can define special tools to heal that WhatHeal will recognize.
    #
    # Example tool:
    #
    # Tools:
    #           Wool:
    #                   id:
    #                   type: 1
    #                   healValue: 5
    #                   damageTaken: 4
    #
    # The first number is the id number of the item
    #
    # The second number is the type. This can either be one or two.
    # One will make one of each of the item [U]dissappear[/U] when used to heal.
    # Two will make the tool take damage, eventually being destroyed.
    #
    # The third is the heal value, same as before.
    #
    # Fourth is the amount of damage a tool of type 2 will take.
    
    Tools:
    

    Note that the quantities are in half hearts.
    Commands/Permissions:
    Show Spoiler

    /wh reload
    Permission: 'WheatHeal.commands.reload'
    Reloads the configuration file.
    /wh restore
    Permission: 'WheatHeal.commands.restore'
    Resets all values to default.
    /wh edit
    Permission: 'WheatHeal.commands.edit'
    Changes a value.
    Example:
    /wh edit [item] [amount] - Sets the amount an item heals
    /wh edit [item] [true|false] - Dis- or Enables the given item

    /wh get
    Permission: 'WheatHeal.commands.get'
    Gets a value
    <no command>
    Permission: 'WheatHeal.heal'
    Allows player to heal others

    Currently implemented foods:
    • Wheat
    • Pork
    • Cooked Pork
    • Fish
    • Cooked Fish
    • Bread
    • Cookie
    • Apple
    • Golden apple
    • Mushroom stew
    • Red and Brown Mushrooms
    • Cake! (this.[cake] != Lie )(unless of course i am lying:))
    To do list:
    • Water buckets
    Known Problems:
    • None!
    Changelog:
    Changelog (open)

    Version 2.0.1
    • Fixes NPE
    Version 2.0
    • Added tools! Create them in the conf by the specifications of the directions, and have personalised healing tools!
    • MC 1.8 Support, it now feeds people by default, though you can still go back to the old methods byt changeing the correct conf Node.
    Version 1.2
    • Fixed API, will be creating a tutorial for hooking in very soon.
    • Annotated conf! TO get the latest version you will need to delete your old config.yml file.
    Version 1.1
    • Added get, edit, restore, and reload commands
    • Added API
    • Throw an egg, and they're healed!
    • Heal yourself with wheat (same as healing others with wheat)
    Version 1.0
    • New permission! To heal you now must have the wheatheal.heal permission!
    • Fixed infinite heal with one item
    Version 0.4
    • Added Milk, eggs, sugar, and sugarcane
    • Fixed a bunch of errors in 0.3
    Version 0.3
    • Added Cake and Mushrooms
    • Small fixes
    Version 0.2
    • Added Pork, fish, Bread, Coookies, Apples, and Mushroom Soup.
    • Mushroom Soup returns a bowl
    • Added "/wh reload" command
    • Config file now has controll over which foods are used and what they heal.
    • You cannot heal people beyond ten hearts now
    • Added permissions/Bukkit Permissions support
    Version 0.1 (initial release)

    Very special thanks to @EdTheLoon and @Lathanael who are both collaborating on this plugin.

    Also thanks to @BR_ , who helped me develop this plugin.

    Source Code

    Old versions:
    2.0(CB: 1185)
    1.2(CB: 1060)
    1.1(CB:1060)
    1.0(CB:1000)
    0.4(CB:1000)
    0.3(CB:1000)
    0.2(CB:1000)
    0.1 (CB: 1000)
     
    JohnEBH likes this.
  2. Offline

    y1985

    Yup, Conf generated. It should work, I'll re-check again tomorrow.
     
  3. Offline

    y1985

    Still not work :(
    Is it because Sprout?
     
  4. Offline

    EdTheLoon

    I run spout and it doesn't cause any problems
     
  5. Offline

    Numenorean95

    Define not work. What isnt it doing?
     
  6. *cough* Title again :p
     
  7. Offline

    Numenorean95

    I am going to shoot something.

    WheatHeal V1.0 is out!
    See above for details.

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

    EdTheLoon

    Yaaaay! :D

    Edit: Cake is always a lie!
     
  9. Offline

    GothikaGeist310

    I also can't seem to get this plugin to work. It runs fine, (says WheatHeal 1.0 Enabled) the configuration file is created and I've also tried changing values a bit. But anytime I punch someone with ANY healing item it just won't let me heal them. If you need any more information let me know.
     
  10. You have enabled healing with tem right? Any information you can give helps us finding the issue ;)
     
  11. Offline

    GothikaGeist310

    Code:
    Foods:
        Sugar:
            healValue: 3
            enable: true
        Bread:
            healValue: 3
            enable: true
        Cake:
            healValue: 20
            enable: true
        Milk:
            healValue: 7
            enable: true
        Cookie:
            healValue: 7
            enable: true
        Sugarcane:
            healValue: 2
            enable: true
        Apple:
            healValue: 5
            enable: true
        RawPork:
            healValue: 3
            enable: true
        RawFish:
            healValue: 4
            enable: true
        GoldenApple:
            healValue: 20
            enable: true
        Egg:
            healValue: 4
            enable: true
        MushroomStew:
            healValue: 10
            enable: true
        CookedFish:
            healValue: 8
            enable: true
        BrownMushroom:
            healValue: 6
            enable: true
        RedMushroom:
            healValue: 7
            enable: true
        Wheat:
            healValue: 1
            enable: true
        CookedPork:
            healValue: 8
            enable: true
    Permissions:
        useBukkit: true
    
    That's my Config.
     
  12. Offline

    Numenorean95

    Have you given yourself the wheatheal.heal permission?
     
  13. Offline

    Nolig

    I will do a video . :)
     
  14. Offline

    Numenorean95

    Sounds good, thanks :D
    I will warn you though, we are going to be coming out with alot of new stuff soon.
     
  15. Offline

    Nolig

    That sounds good two . I will upload the video in a few minutes :)
     
  16. Offline

    GothikaGeist310

    Well I'am an Op/Admin and I don't use any permissions Plugins...
     
  17. Hmm it should automaticly fall back to OP/all if no permissions plugin is installed...
     
  18. Offline

    Numenorean95

    How did you test it? Also, i notice your conf says useBUkkitPermissions: true. Try changing that to false.
     
  19. Offline

    GothikaGeist310

    I will try that (Setting the permissions to false). I "tested" it by left-click/right-click on my friends with various items: Cookies, wheat, bread, porkchop (cooked) and it never healed them (only me when I right-clicked :p )
     
  20. Offline

    Numenorean95

    Hmm this is interesting. Though any excuse to eat cake is a good one, it might be you have a conflicting plugin OR we wrote the plugin incorrectly. Could you give us a list of yor plugins?
     
  21. Offline

    GothikaGeist310

    I don't think it's caused by any other plugin because this was the absolute FIRST plugin I ever downloaded :3 I ran my server with this and nothing else and it still didn't work. Although soon after I did get mcMMO. But I am running alot more plugins now. If you still need the list, let me know.
     
  22. We'll release a new version very soon, maybe you can try that one(once it is out) and report back if you still encounter that issue
     
  23. Offline

    EdTheLoon

    Are you still having problems? We tried this during testing and it worked fine so I don't know how this is happening
     
  24. Offline

    Numenorean95

    Please welcome WheatHeal version 1.1 into the world!
    See above for details.
     
  25. Offline

    GothikaGeist310

    I'll test it out RIGHT NOW :D Results will be posted temporarily...

    Still doesn't work. Okay, how about this. Are you suppose to right-click or left-click on someone? I am left-click which just punches. Right-clicking makes me eat the food. And I was just wondering, do you think we have to be in the same "Party" to heal each other? mcMMO does have some kind of party integration.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  26. Left clicking (punching) is the way to do it ;).Do you have the permission to heal someone? (wheatheal.heal)
    Which permissions plugin are you running if any?
    Are you OP?
     
  27. Offline

    GothikaGeist310

    As I said before xD I am Op/Admin an don't use ANY permission plugin. BUT, I did just notice that I tested it with the Bukkit Permission thing set to true, so now I'll test it when set to false.
    Nope, still dosen't work. Even with the BukkitPermissions set to false. I had someone punch me with cooked pork and cookie when i was missing three hearts. Nothing Happened. I did the same thing when I set my buddy on fire. Nothing happened. And I'm about to make sure that BukkitPermissions is indeed set to false.

    Code:
    Foods:
        Sugar:
            healValue: 3
            enable: true
        Bread:
            healValue: 3
            enable: true
        Cake:
            healValue: 20
            enable: true
        Milk:
            healValue: 7
            enable: true
        Cookie:
            healValue: 7
            enable: true
        Sugarcane:
            healValue: 2
            enable: true
        Apple:
            healValue: 5
            enable: true
        RawPork:
            healValue: 3
            enable: true
        RawFish:
            healValue: 4
            enable: true
        GoldenApple:
            healValue: 20
            enable: true
        Egg:
            healValue: 4
            enable: true
        MushroomStew:
            healValue: 10
            enable: true
        CookedFish:
            healValue: 8
            enable: true
        BrownMushroom:
            healValue: 6
            enable: true
        RedMushroom:
            healValue: 7
            enable: true
        Wheat:
            healValue: 1
            enable: true
            selfHeal: true
        CookedPork:
            healValue: 8
            enable: true
    Permissions:
        useBukkit: false
    

    It is.
     
  28. Hmm intresting, will setup a test server where i only have WheatHeal and fresh Bukkit. I could make a special version for you with some debug lines so we may figure out what is happening.
     
  29. Offline

    EdTheLoon

    And you definitely reloaded the configuration or restarted/reloaded your server?
     
  30. Ok i have tested it now. It does work, are you absolutly sure that your name is in the ops.txt? Can you use the command '/wh reload' ? I do not know what is wrong but it works fine with CB#1060 here.

    BTW healing is enabled by default for everyone if there is no permission plugin installed, so you wouldn't even need an OP status to use it...
     
  31. Offline

    GothikaGeist310

    I restart the server everyday. Hell everytime I get a new plugin/update a plugin automatically or manually. So yes, my server is constantly restarted. I am VERY sure I'm in my Ops.txt since I am using ALOT of plugins that default to Ops permission, in any case though as you said there are no default permissions for WheatHeal. In any case I'll check the ops.txt . Yup, I'm the only thing (Username :p) in there.
     

Share This Page