I have a simple request, and it shouldn't be hard to add. It is, as you can probably tell, healing you if you sleep in a bed. C'mon, who doesn't want this feature?
i ain't a plugin developer but i think: when player goes into bed you set the health and setting health is easy
If you'd like me to make this, feel free to message me. I'd like to build it into my upcoming plugin pack.
ok your gonna need to add the imports. then try and make the plugin i guess *connect* to the server. from what ive seen its called pluginmanager. im guessing these are the major imports you WILL need. im not 100% sure how to setup the way it connects. ive been told about 3-4 different ways. import java.util.logging.Logger; import org.bukkit.event.Event; import org.bukkit.event.Event.Priority; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; his tutorials are cool. but not very well planned. some what rushed :/ ive been trying to learn java off of old deprecated plugins. i like to try and update them and see if they will run EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I have been doing that since before I even asked. I just like to justify that I'm doing the right thing. I was.
Thanks, dude This is really confusing at the moment, but I think I just might take his source code, and adapt it into BedHeal. It is getting kinda late, I should probably wrap up for the night soon, want to finish writing the plugin, though. Haha, can't believe you finished it, while I'm here wondering what type of event I should use for when a player enters a bed. I applaud you, sir! I'll definitely poke around at the source code. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I'm sorry, but I was so smart when I were tired, almost sleeping, that I forgot to save my project. So nothing got saved, I got no time tomorrow, but the days after tomorrow I'll have to to make it again =O One tip to all of you guys, Never EVER! code when you are almost sleeping
lol ok? anyway you look at it if you were using eclipse, it warns you if u didnt save. the only way to loose your project is if you hard restarted your pc :/
Well, my pc froze, damn you not-unix-os, and i couldnt save any projects But just ask me if you want to try to make your own plugin, I'm gladly to help
Yeah, I'd really like to start making plugins I'm very, very beginner with Java. Thanks for the offer, dude. If you re-do the plugin, I'd definitely look at the source, and if not, could you please explain how I could do it myself?
I'll just start making this plugin, will see if i get this to work Edit: Done Coding, im testing it now and releasing then
I'm wondering, do you giva a player full health when he right clicks the bed? Or will it heal after a time inside the bed?
Well, that means he gets full health instantly? Right? Not to complain, not very hard coded though, btw I got time to redo plugin, maybe one hour left to work on code (I'm watching The Simpsons while I'm coding) =P
heres the link: http://forums.bukkit.org/threads/mech-bedheal-1-0-heals-sleeping-players-740.15884/ Nothing complicated but it works and why not? What should it do, get one lifepoint per second and stopping after its daylight? so you perhaps only regen two lifes if the server is fast?
like said before, why? i have no clue why it should only heal slowly, because after one sleeping (which is limited in time) it becomes day(so no second sleep) there are two cases (it heals all in the given time/or not) this could also be added by only adding perhaps 5 or 2 lifepoints per sleep. no need for any timing here