Thirsty Craft :P

Discussion in 'Archived: Plugin Requests' started by Doc.Deniz, May 20, 2012.

  1. Offline

    Doc.Deniz

    I have a good idea.
    Like the hunger system in game, a thirst system can be made. People get thirsty as time passes, and they satisfy their thirst by drinking water. Would me amazing for role playing game servers.

    Thanks in advance, I am sorry if there is any grammar mistakes.
     
  2. Offline

    Doc.Deniz

    Nobody?
     
  3. Offline

    snickers10m

    Well, it would be kind of iffy... considering that the client would have to type a command to find out their thirst lol... but I'll see what I can do.
     
  4. Offline

    Doc.Deniz

    Writing a command is not too hard. And also if it warned when thirst is at dangerous level, it would be really fantastic.
     
  5. Offline

    Grey_M62

    maybe if it warned every time it went down?
     
  6. Offline

    TheBeast808

    Not a bad idea. Not sure if it has been implemented before, though. it would need to have a chat based graph of thirst, though. Perhaps broadcasting every 1-5 minutes?
    How would thirst go down? Would it constantly go down at the same rate, or would it be like hunger?
     
  7. Offline

    Zoroark173

    My 2 cents on this: It should be really customizable, and the config file should look something like this:
    Example config and what each spot means
    Show Spoiler

    Max: The max amount of thirst you can have
    Lose per interval: How much thirst you loose per interval
    interval: How long the interval is between each loss (in seconds)
    show every: Show your thirst every # Seconds
    Water vial: How much thirst a water Vial refills
    Water Bucket: How much thirst a Water Bucket refills
    Milk Bucket: How much thirst a Milk Bucket refills
    Bar left: What the left side of the Thirst bar looks like
    Bar full: What all of the Thirst bar portions look like
    Bar empty: What a thirst bar portion looks like if you are below it
    Bar right: What the right end of the thirst bar looks like

    Here would be an example of the default config:
    Show Spoiler

    Max: 100
    Lose per interval: 1
    interval: 60
    show every: 300
    Water vial: 5
    Water Bucket: 15
    Milk Bucket: 15
    Bar left: {
    Bar full: []
    Bar empty: o
    Bar right: }

    And this is what would show (at 50 thirst):
    THIRST: {[][][][][]ooooo} 50/100

     
  8. Offline

    Doc.Deniz

    This is wonderful!
     
  9. Offline

    Zoroark173

  10. Offline

    Ferkswe

    I'm gonna give this a tiny bumb, I've wanted this for a while actually.
    A few things,
    Thirst doesn't go down, it goes up.
    Also, why broadcast your thirst at any other interval than the interval thirst goes down? It could just be a simple message set in the config,
    You just got a bit thirstier.
    or
    {[][][][][][][][][][]}
    I think a simple message is easier than the bar thingy.

    If this would be possible, it would be awesome!
     
  11. Offline

    limdingwen

    All right, then my TechnoRPG's Water Module shall stop development then. :(
     
  12. Offline

    Ferkswe

    What? Why? D:
     
  13. Offline

    Orcem12

    Doc.Deniz
    @Ferkswe
    I can do this.

    @Zoroark173
    I'll try to mimic your configuration.

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

    Doc.Deniz

  15. Offline

    vsams14

    The issue with the bar idea is that it is very hard to add icons and stuff to a bukkit plugin. This would be simple if you were writing a MC mod, but you are not, so everything must be handled through chat. If you have a ton of players on your server, this could make the chat REALLY messy...
    Just sayin'
    vsams14
     
  16. Offline

    Zoroark173

    Thanks.

    I don't know, but if we can cater to more people, while not excluding those originally, it makes it better for everyone. Instead of why broadcast it at any other interval, why not? Some person might want it to show halfway in between when it goes down a notch, that might be strange, but that's what they want. This lets us please more people, because instead of just allowing those who want it go down when your thirst goes down, it would let people who want that, and it showing at irregular times to use it. If you don't like it, don't use it. But If I were you, then I would just try to match up the times.

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

    Ferkswe

    Good point, I stand corrected.
     
  18. Offline

    Doc.Deniz

    No need to add a bar. Just a chat bar thing, showing an interval to the player. Not too hard.
     
  19. Offline

    Zoroark173

    Maybe in the config you can have a Boolean setting for textonly?
     
  20. Offline

    CoKoC

    [​IMG]
    Hi,

    I made your plugin.
    You may download it here : <Edit by Moderator: Redacted mediafire url>

    Since your plugin wasn't really specific, I took the liberty to follow leads and indications provided by the comments of the thread. The configuration system is like @Zoroark173's, with some small tweaks.

    Here are the configurations used by the plugin :

    The only command is /checkthirst alias /ct, to check your current thirst.
    Also to drink from a bucket or vial, you need to crouch-click.

    Here's a video of the plugin in action :



    If you have any questions, comments, updating request, insults, thanks, poke me on my profile with a link to this thread, where you express yourself.

    Regards,
    Sam.
     
    Last edited by a moderator: Nov 10, 2016
  21. Offline

    Orcem12

    @CoKoC
    I know you made the plugin but next time, quote the person already making the plugin. Thanks.
     
  22. Offline

    Doc.Deniz

    CoKoC
    Thanks for everything. This is awesome.
    Orcem12
    I dont understand what you are talking about. Did you actually make this?
     
  23. Offline

    izak12345678910

    CoKoC I get this error when someone dies and for some reason when my players drink water the water meter won't go up
    09:07:52 [WARNING] Could not properly handle event ITEM_SPAWN:
    java.lang.IllegalAccessError: Synchronized code got accessed from another thread: cokoc.thirst.Thirst$1
    at org.bukkit.event.Listener.onItemSpawn(Listener:0)
    at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callItemSpawnEvent(CraftEventFactory.java:251)
    at net.minecraft.server.World.addEntity(World.java:894)
    at net.minecraft.server.World.addEntity(World.java:864)
    at org.bukkit.craftbukkit.CraftWorld.dropItem(CraftWorld.java:315)
    at org.bukkit.craftbukkit.CraftWorld.dropItemNaturally(CraftWorld.java:329)
    at com.revised.CallOfDutyMC.PL.onEntityDeath(PL.java:65)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:317)
    at net.minecraft.server.EntityPlayer.die(EntityPlayer.java:173)
    at org.bukkit.craftbukkit.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:59)
    at cokoc.thirst.Thirst$1.run(Thirst.java:31)
    at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    09:07:52 [INFO] This error is logged only once: it could have occurred multiple times by now.
    09:07:52 [INFO] Please contact one of the authors of plugin 'Thirst': CoKoC
    09:07:52 [WARNING] Could not properly handle event ITEM_SPAWN:
    java.lang.IllegalAccessError: Synchronized code got accessed from another thread: cokoc.thirst.Thirst$1
    at org.bukkit.event.Listener.onItemSpawn(Listener:0)
    at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callItemSpawnEvent(CraftEventFactory.java:251)
    at net.minecraft.server.World.addEntity(World.java:894)
    at net.minecraft.server.World.addEntity(World.java:864)
    at net.minecraft.server.Entity.a(Entity.java:1120)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:331)
    at net.minecraft.server.EntityPlayer.die(EntityPlayer.java:173)
    at org.bukkit.craftbukkit.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:59)
    at cokoc.thirst.Thirst$1.run(Thirst.java:31)
    at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    09:07:52 [INFO] This error is logged only once: it could have occurred multiple times by now.
    09:07:52 [INFO] Please contact one of the authors of plugin 'Thirst': CoKoC
    09:07:52 [INFO] izak12345678910 starved out of thirst.
     
  24. Offline

    CoKoC

    Would you be able to reproduce the error on a server which only uses Thirst?
    If you do, please send me your steps to get to the error, as I can't get it myself.
    Thanks.
     
  25. Offline

    izak12345678910

    Die of thirst.
     
  26. Offline

    danslayerx

    I'd really like to see this plugin continue development, I tested it and here's some errors for you.

    - When you die on the respawn screen you'll start to loose 'thirst' even though you haven't respawned yet.
    - Drinking anything won't increase you're thirst.

    I'm not sure why or were the error is? But I'd really love to see this finished!
     
  27. Offline

    Ne0nx3r0

    Just a thought, but you could display the "thirst level" using a damageable item, like a wood shovel or something.

    Alternatively you might be able to use a weak/null potion effect, and use that as a countdown to when they need to drink again to prevent damage.

    Just some ideas on how you could visually show thirst.
     
  28. Offline

    danslayerx

    That would be a BRILLIANT idea, it would work really well and would stop spam in chat from the plugin since having to use a damageable item would be irritating as of taking up inventory slots.

    Like I said would really like to see this finished, we're using the primordial desert generator for our next map and I think this plugin would definitely make it more interesting.
     
  29. Offline

    izak12345678910

    Yes i have seen that error you drink and drink and drink and nothing happens.. You just end up dying.
     
  30. Offline

    CoKoC

    The plugin is still in close check, but I currently have some work to do on PotionProtect (as I'm releasing it on BukkitDev).
    I will fix the bugs and add your requested features during this weekend.
     

Share This Page