Old Hunger

Discussion in 'Archived: Plugin Requests' started by Hoolean, Aug 12, 2012.

  1. Offline

    Hoolean

    Plugin category: Mech

    Suggested name: ClassicHunger


    What I want: Hunger like it is in older versions of Minecraft (pre 1.8 I think) When you eat it fills your health and your hunger never changes (always high enough to be able to run). Minecraft PVP's CTF servers use something like it.

    Ideas for commands: No commands for this plugin.

    Ideas for permissions: Maybe if you have the right permission you get old hunger but not too bothered really.

    When I'd like it by: Don't mind.

    <bump>Please Help</bump>

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

    kezz101

    Wait at least 12 hours between bumpsss
     
  3. Offline

    Hoolean

    Sorry :( I'm new here. Any rules I should read?
     
  4. Offline

    np98765

    Well, there's the sticky thread that is highlighted at the top of the page labelled [READ ME FIRST].
     
    gomeow and WaffleOnABike like this.
  5. Offline

    Hoolean

    Oops. Well I didn't see it because it was a ninja. Probably. Maybe. OK I will read!
     
  6. Offline

    kezz101

    *wonders how you managed to get the formatting but not read the main post*
     
    WaffleOnABike likes this.
  7. Offline

    Hoolean

    Copied off of someone :D
     
  8. Offline

    kezz101

    Fair enough!
     
  9. Offline

    Hoolean

    Phew... :D
     
  10. Offline

    Dragonphase

    Give me an hour or two

    EDIT 2: do you want players health to go to full regardless of what they eat, or give them a specific amount of health depending on what was eaten?
     
    MrBluebear3 likes this.
  11. Offline

    Hoolean

    Please could there health go up the same amount of hearts as hunger icons would go up. Also could the Hunger Bar always stay at the exact same level, regardless of what is eaten. The level would have to let the player run. Thinking about it, a configurable level in a config may be best. Permissions could activate the Old hunger for certain players.
    Thanks for working on this :D

    BTW, I would like to start developing plugins, so do you know a good place to get started? I understand the premesis of programming but only know a smidge of Java at the mo'.

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

    Dragonphase

    No problem, It's almost done. Could you tell me:

    Do you want the eating animation to play? (may take more time if its possible, or does it not matter?)
    What permissions system are you using?
     
    MrBluebear3 likes this.
  13. Offline

    Hoolean

    Nah animation doesn't matter. I am using PermissionsBukkit. BTW you are epic :D . i will pay you in likes and diamonds [diamond]
     
  14. Offline

    unholyone

    dragon check ur pms :3
     
  15. Offline

    Dragonphase

    Hahaha no problem man. One more question:

    Zombie flesh and spider eyes are food, yet they will have a chance to poison players. Do you want me to set the poison effect on players that eat these items and heal them for their worth still?

    EDIT: Raw Chicken also has a chance to poison the player. Should I do this too? Golden Apples and Enchanted golden apples also
     
    MrBluebear3 likes this.
  16. Offline

    Hoolean

    If it is possible to poison them for a bit then do so - if not then maybe make it configurable. Golden Aplles would be great BTW! Thanks again! [diamond]
     
  17. Offline

    Dragonphase

    Well, the plugin's done right now, working fine, cake works too. I just need to add the poison effects.
    Only thing is, I can't find a way to get it to check to see if you have the permission node in PermissionsBukkit (if there's a way, someone tell me, because i was looking for a while with no success)

    On the flipside, I have made it work using PermissionsEx, which is a much better permissions plugin. if you'd like to see it in action, join my test server: 2.29.49.126
     
  18. Offline

    Hoolean

    "java.net.SocketException: Network is unreachable" or maybe you have stopped the server now. Anyways, I would be able to try it out with PermissionsBukkit, so could I please give it a go. :D
     
  19. Offline

    Dragonphase

    Never mind, permissions system should work for pEx and pbukkit. I'm just setting up the poison chances now but i should be done in the next hour or less.
    EDIT: i just realised, giving someone poison is kinda redundant - they will be healed... then they will lose health. besides, most food poisoning effects in minecraft affect the hunger bar, which doesn't get effected in ClassicHunger. Should I still do it?

    https://dl.dropbox.com/u/38185080/ClassicHunger.jar
    There you go. Give players permissions node 'classichunger.set' to give them classic hunger. also make sure you're NOT OP - this will give you classic hunger. (or just give yourself node 'classichunger.set: false' or something).

    Also, I disabled potion effects since they wouldn't actually kill the player even though it says they died. Plus the fact that they would bee useless for Classic Hunger.

    You can also set the health values in the config it generates. by default, they heal the player for the amount of hunger they would normally get.

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

    Hoolean

    Thanks your amazing! You should maybe make this public, I think it would be very popular!

    Just tested it, got this :(
    Code:
    18:50:35 [SEVERE] Could not load 'plugins/ClassicHunger.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: org/Dragonphase/ClassicHunger/ClassicHunger : Unsupported major.minor version 51.0
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:155)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:222)
        at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:565)
        at org.bukkit.Bukkit.reload(Bukkit.java:183)
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:21)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:492)
        at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:488)
        at net.minecraft.server.DedicatedServer.ah(DedicatedServer.java:248)
        at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:213)
        at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:476)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
    Caused by: java.lang.UnsupportedClassVersionError: org/Dragonphase/ClassicHunger/ClassicHunger : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:144)
        ... 14 more
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 27, 2016
  21. Offline

    kahlilnc

    Could you possibly make multi world support? So maybe define in config if it works in one world only or multiple?
     
  22. Offline

    Hoolean

    Not really needed though is it. Just set up per-world permissions and only give the permission node on certain worlds. :D
     
  23. Offline

    kahlilnc

    True but I use global for bpermissions ;(
     
  24. Offline

    Dragonphase

    This is an error caused by your java version. you should update your JDK.

    I'll give it a shot, do you want me to make it so it has an option like this in the config:

    worlds:
    - world1
    - world2

    ?
     
  25. Offline

    kahlilnc

    Yeah that would be awesome :D
     
  26. Offline

    Dragonphase

    kahlilnc likes this.
  27. Offline

    Hoolean

    Unfortunately I use Mac OS, which is not compatible with Java 7. :(
    Anything you can do about it?

    P.S. To people who read this please don't turn this thread into a Mac vs Windows vs Linux rage place.
     
  28. Offline

    Dragonphase

    https://dl.dropbox.com/u/38185080/ClassicHealth.jar

    Try this, i built it using an earlier version of the JDK. Since i don't really understand how a Mac operates... but you should be able to update it to Java 7 atleast :/

    Oh also i renamed it to ClassicHealth, for convenience. so you need to change classichunger.set to classichealth.set
     
  29. Offline

    Hoolean

    Thanks! Macs are generally the same but they Oracle have not released a port of Java 7 that fully works with Mac. Trust me, I've tried :D .
     
  30. Offline

    -_Husky_-

    Yes they do, :p i have mac too
     

Share This Page