Suggested name: Ender Crystal Regeneration What I want: I want a plugin that when someone break a ender crystal, they will respawn after 5minutes Commands: /spawncrystal - Spawn a ender crystal Permissions: crystal.spawn - Spawn a ender crystal
essentials has a /spawnentity and /spawnmob command that will allow you to spawn any mob or entity including the ender crystal
Profan I'll see what i can do about it. I'll flip through the API a little tonighht before bed and may have a prototype for you tomarrow would you like only the endercrystals spawned by players to regenerate, or also those naturally occuring in the end? Profan Oh, yeah, this should take at max 15 minutes. I'll see what I can do in class tomarrow... On second thought, mabey a bit more than that because of remembering where the crystals are and where they need to be after 5 minutes, even after the server restarts. Still, I should have it for the most part, a working concept tomarrow. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Profan that actually simplifies things a bit! Would you also like a command that removes them, so you actually have a way to get rid of them?
Profan I know i can make it, its just a matter of finding time to do it at this point. I just finished updating NeoChat to v1.7.9 and now I need to Update some of my servers custom plugins. I'll see if i can't get something up within the week. Also, PM me about this from now on. We dont need to keep bumping the thread.
timtower i realize this, it just seems silly to continue to bump the thread. Btw Profan i have a long homeroom today, upwards of an hour, so i will have time to code this. I beleive the best way to do it is to keep a list of RegenCrystal objects that each have a Vector and a timer, then make a runnable that itterates through each crystal object (these are created upon a player destroying a crystal) and decrement 1. When that objects value hits Zero, put the crystal back and remove the object from the list. On disable stop the runnable, and then loop through existing crystals and save their info to a config. On enable, load the data from the config and remove the info inside it. Can you confirm this is the best way to do this timtower ?
RegalMachine If it is a 5 minute timer then I suggest that you just restore them onDisable, not really a big issue for such a small time.
timtower the issue i see with that is server crashes. If it crashed it would loose all pending crystals
If you just save it in the onDisable then you will still have that issue. Or save the locations only and restore the block in onEnable.
timtower Good Point Profan Finished. Commands: /crystal [spawn/remove/info] Permissions: crystals.command.spawn Allows for the spawning of Ender Crystals (The way Bukkit spawns them in is a little weird, but that's Bukkit's fault, not mine) crystals.command.remove Allows for the removal of Ender Crystals Every time an Ender crystal is destroyed, it keeps track of it, and after 5 minutes, or after a reload, the crystal gets placed back into the world. Keep in mind the fact that the crystal will be floating if the area is not protected from blast damage and the crystal blows up some blocks. I will be uploading the plugin tomarrow, as i don't have time to type up a project right now. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
timtower good to know, but i can't get on my VNC anymore today, i'll have to do it tomarrow morning Profan Here you go! https://www.dropbox.com/s/1xj0uhnqwtfsuwl/RegenCrystals.jar I fixed the way it spawns in the crystal, so now it spawns in the right place (where you are looking) if you have any questions or suggestions i am happy to comply! Tahg me with questions, and enjoy your plugin! Label this filled now EDIT by Moderator: merged posts, please use the edit button instead of double posting.