Food healing.

Discussion in 'Plugin Help/Development/Requests' started by thecerealkill3r, Oct 11, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    thecerealkill3r

    Hi!
    Config : N/A
    Permissions: N/A
    Commands: N/A
    Plugin Name: FoodHeal
    --------------------------------------

    Eating the specified items below will heal you 1/2 a heart when eaten.
    Apple
    Baked Potato
    Carrot
    Bread
    Cooked Pork
    Cookie
    Golden Apple
    Golden Carrot
    Melon Slice
    Mushroom Stew
    Raw Beef
    Raw fish
    Raw Pork
    Steak

    Eating ANY of those items will heal the eater 1/2 a heart.

    When I would like it? : ASAP, really. I need it really bad.

    Thanks :)
     
  2. Offline

    pie_flavor

  3. Offline

    thecerealkill3r

  4. Offline

    pie_flavor

    Random comment for anyone interested: No idea how they got it to compile, but Bukkit has both the int and double forms of getHealth in the same class. So
    Code:java
    1. e.getPlayer().getHealth();
    changes to
    Code:java
    1. try {
    2. e.getPlayer().getClass().getMethod("getHealth",double.class).invoke(e.getPlayer());
    3. } catch (IllegalAccessException e1) {
    4. e1.printStackTrace();
    5. e1.printStackTrace();
    6. e1.printStackTrace();
    7. } catch (NoSuchMethodException e1) {
    8. e1.printStackTrace();
    9. } catch (SecurityException e1) {
    10. e1.printStackTrace();
    11. }


    EDIT: Lel, just searched "ambiguous method" on Google. First link is a Stack Overflow thread on Method getHealth() is ambiguous for the type Player.

    Depends on your download speed.

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

    thecerealkill3r

    pie_flavor :DDD

    pie_flavor Hm, doesn't seem to work. Doesn't even show up in the plugin list. Please fix when you get the chance D:

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

    timtower Administrator Administrator Moderator

  7. Offline

    pie_flavor

    thecerealkill3r Then you probably don't use Java 8. Redownload approximately 30 seconds after this message has been posted.

    thecerealkill3r The project was just compiled using Java 6. Again, the download link is here.

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

    thecerealkill3r

    pie_flavor
    At least it shows up in the plugin list now, but still doesn't heal.
     
  9. Offline

    pie_flavor

    thecerealkill3r I don't know what to tell you. Is there a stack-trace?
     
  10. Offline

    thecerealkill3r

    pie_flavor I don't know what that is, sorry. If it helps, natural regeneration is disabled.

    EDIT: I know what they are, but how would I know where a stack-trace is?
     
  11. Offline

    pie_flavor

    thecerealkill3r In the console, silly. Every time something doesn't happen the way I say it will happen, there's usually a very long list of fully qualified class names, and the name of an exception. I would like a pastebin or [code][/code] of it.
     
  12. Offline

    thecerealkill3r

  13. Offline

    pie_flavor

    thecerealkill3r Well, obviously there won't be an error upon starting up. I mean, is there a stack-trace when you eat one of the listed foods?
     
  14. Offline

    thecerealkill3r

    pie_flavor

    I'll see when I get home from school


    There isn't a stack trace.

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

    timtower Administrator Administrator Moderator

  16. Offline

    Watto

    timtower pie_flavor

    I tried to de-compile the code to see if i could help..
    There isn't any code...

    Never mind my decompiler failed :s
    Now i can't help D:
     
  17. Offline

    thecerealkill3r

    timtower
    I did. It's right up there. That's literally right after a restart.
     
  18. Offline

    timtower Administrator Administrator Moderator

    thecerealkill3r Never when you used the food though. We want that, and there is a sub-forum for spigot and other builds these days, please use them, requested a move.
     
  19. Offline

    thecerealkill3r

    timtower
    There was no message in console when I ate the food.

    timtower
    Watto
    pie_flavor

    There's no code in the plugin...

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

    Watto

    thecerealkill3r

    There is. I had the same problem. If you open the jar in winrar or other zipping applications you will see the .class files
     
  21. Offline

    thecerealkill3r

Thread Status:
Not open for further replies.

Share This Page