[Formated] InstaSoup

Discussion in 'Archived: Plugin Requests' started by SmileZisGFX, Jun 12, 2012.

  1. Offline

    SmileZisGFX

    Plugin category: Misc

    Suggested name: InstaSoup

    A bit about me: I'm a new server host, who is really bad at plugins. I am currently about to launch my PVP server!

    What I want: I want a plugin that instantly eats soups and refills your health (like on McPVP) I know there are plugins out there but they do all food. If someone could explain to me how to configure that, that would be fine to!

    Ideas for commands: /instasoup reload

    Ideas for permissions: insta.*

    When I'd like it by: ASAP, as I said I'm launching my server soon!
     
  2. Offline

    jamietech

    What would the reload command do?
     
  3. I am looking at the same plugin as you i even posted a thread to
     
  4. Offline

    jamietech

    Plugin without reload command and uses node "instasoup.use", ops have permission node.
    Code:
    package tk.nekotech.instasoup;
     
    import org.bukkit.Material;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.block.Action;
    import org.bukkit.event.player.PlayerInteractEvent;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class InstaSoup extends JavaPlugin implements Listener {
     
    public void onEnable() {
    getServer().getPluginManager().registerEvents(this, this);
    }
     
    @EventHandler
    public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getPlayer().hasPermission("instasoup.use") && event.getPlayer().getItemInHand().getType() == Material.MUSHROOM_SOUP && event.getPlayer().getFoodLevel() != 20) {
    event.getPlayer().setFoodLevel(event.getPlayer().getFoodLevel() + 8);
    event.getPlayer().getItemInHand().setType(Material.BOWL);
    }
    }
     
    }
    If you wish to compile it manually simply use that code ^^ otherwise there is a jar at http://nekotech.tk/junk/InstaSoup.jar
     
  5. Offline

    SmileZisGFX

    Didn't work
     
  6. Offline

    jamietech

    SmileZisGFX Can you tell me what problems you are experiencing as it works perfectly fine for me.
     
  7. Hm jamietech so the problem is that when i right-click the soup it just heals your hunger not your health can you fix that please?
     
  8. Offline

    jamietech

    The request was for instant eat not for health fix. If you want a health fix I can do that too but what level of health and hunger would you want restored when the user "eats"?
     
  9. I would say like 4 hunger and 3 hearts
    Btw i also add you to my conversation so we can talk
     
  10. Offline

    SmileZisGFX

    I'm sorry I meant it for you to right click with a soup and it heals your health bar. When I tested it out it didn't instantly eat it.
     
  11. Offline

    izak12345678910

    You want it when you drink/eat it its automatic like old mc when you eat something?
     
  12. Offline

    jamietech

    How many hearts do you want it to heal?
    Do you want it to still replenish hunger?
     
  13. Offline

    SmileZisGFX

    3 hearts, refills your hunger after your health is full. Like 1.7
     
  14. Offline

    SmileZisGFX

  15. Please show the code to heal 3.5 hearts! I need this reallllly bad!!!
     
  16. Offline

    HyrulesLegend

    Please update. >_<
     
  17. Offline

    JjPwN1

    I'll update it... very easy to make.

    I have made BbySoup for you guys. It has a major bug where if your health is at 7.5 or above and you right-click mushroom soup it doesn't give you health and spams console with errors. I'll fix it tomorrow, I have to go to bed right now! You can download it <Edit by Moderator: Redacted mediafire url>

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 10, 2016
  18. Offline

    wacossusca34

    [quote uid=94887 name="JjPwN1" post=1340257]I have made BbySoup for you guys. It has a major bug where if your health is at 7.5 or above and you right-click mushroom soup it doesn't give you health and spams console with errors. I'll fix it tomorrow, I have to go to bed right now! You can download it <Edit by Moderator: Redacted mediafire url>

    Add check if health value is over 16, since you cannot set a players health to be above 20. Example:

    Code:
    if (e.getPlayer().getHealth() > 16) {
      e.getPlayer().setHealth(20);
    else
      e.getPlayer().setHealth(e.getPlayer().getHealth() + 4);
    Learn to solve basic code problems. :confused:
     
    Last edited by a moderator: Nov 10, 2016
  19. Offline

    MYCRAFTisbest

    I tend to like the idea of having extra meter.

    I would be like the days of Contra

    Ah Contra, no one could beat you without those 30 lives with button combo and not know how many lives u had.

    Good times.

    Actually i like it so much


    http://dev.bukkit.org/server-mods/PVPmeal/

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

    JjPwN1

    That's not very useful. So, you're saying if people have too much health, they shouldn't be eligible to get the health? Also, do not throw offenses, please. If you read correctly, you'd see I didn't have time to fix it, as I had school early the next day.
     
  21. Offline

    np98765

    Ummm, no, if the player has health over 16, their health will be set to 20. If not, then 2 hearts will be added.
     
  22. Offline

    WarmakerT

  23. Offline

    JjPwN1

    Eugh. Two, possibly more instant soup eating plugins... no need for more.
     

Share This Page