Peaceful Nights

Discussion in 'Archived: Plugin Requests' started by TfT_02, Jan 6, 2011.

  1. Offline

    TfT_02

    So I have this idea for a plugin!
    Some of my users liked the peaceful mode in Single player. Whenever they would build stuff outside, they would turn on peaceful mode. This gave me a idea for a plugin. This plugin should toggle peaceful mode in SMP every x days.
    For example I would configure it so that you would have 1 peaceful day every 2 hours.
    A day in Minecraft is 20min so that would mean that you would have 5 normal days (&nights) and 1 peaceful one.
    When Peaceful mode is toggled there should be a shout in chat with for example, "Peaceful mode is on, it is safe to go outside!" The plugin should have some easy configuration file with the amount of days and the text displayed in chat.

    I do not know if this is possible, please let me know! I think that this idea is possible to make since there is a monsters=false/true line in the properties. And a day/night cycle counter shouldn't be that hard to code, right? Displaying a chat message is very possible, loads of plugins can do that. :)
    Oh and if someone likes this idea and decides to make it, please mention my name somewhere. =P

    Edit: Events could be added too like suggested below!
     
    Purre and Moo Master like this.
  2. Offline

    d2004

    that sounds good :) some player maybe want to have peaceful some dont.
    And it is not really fun to re-start server 80 times just cause i want to make
    all player on the server happy
     
    TfT_02 likes this.
  3. Offline

    Moo Master

    its a great idea, and eventually the developer can add things like days, months, holidays, events etc!
     
    TfT_02 likes this.
  4. Offline

    ChadTheDJ

    Yeah, maybe set something like no monsters on Christmas! :D otherwise I can see using this plugin.
     
    TfT_02 likes this.
  5. Offline

    TfT_02

    =D Great! So more people would like such a plugin. I would like to code it myself if I could, but I have not experience with Java whatsoever so... That's not going to work out.
    EDIT: Just installed Eclipse, just to see where I could get on my own.. :oops: Don't expect too much though.
     
  6. Are the Right Hooks that are Need to-do such a thing Implemented into Bukkit yet?
     
  7. Offline

    TfT_02

    Well, I'm not sure if there is a hook for detecting day/night changes. If that hook is implemented this should be possible to code. Oh and there has to be some kind of hook for changing the monster settings.

    EDIT: If there is a way to change the "monsters-enabled=true/false" line in the properties and just let the plugin reload the mod every time the line is changed, there is no need for a monstersettings hook. This doesn't seem very efficient though.

    EDIT2: Just did some research in the Bukkit Java docs and there is a getTime hook. Couldn't find an actual day/night change detect hook thingy. :O

    Code:
     getTime()  
               Gets the in-game time on the server (in hours*1000)
     
  8. Offline

    Stephen A.

    I would like it so you could have a Calendar type file where you set certain dates in the real world to be monster on/off for the whole day, that is a lot of MC days/nights. Even Better: Halloween No animals will spawn and only creepers will spawn, in sunlight or night, and skeletons riding spiders will always spawn at night! SIMPLER: Keep it night on Halloween!
     
  9. Offline

    TfT_02

    Haha, this is a pretty cool idea!
     
  10. Offline

    Purre

    If they added the CREATURE_SPAWN event (which is in the java docs but not in Bukkit yet), this would be a whole lot easier. Then one could not only control if monsters will spawn or not, one could also specify which types they don't want to spawn. This hook would simply end the need of changing in the properties file.. :p
     
    TfT_02 likes this.
  11. Offline

    Gravity Retired Staff

    sounds cool!
     
  12. Offline

    TfT_02

    Great! I haven't thought of that before!
    Do you happen to have any experience with Java and/or plugin development?
     
  13. Offline

    Purre

    Ya, I've been creating Android Apps with Java and made some small Bukkit plugin, so I'm quite familiar. I should be able to create a plugin like this :)
     
  14. Offline

    TfT_02

    Awesome! :O If I could, I would have made it myself. If I can be of any help just let me know! Oh and if you happen to know a nice guide for learning Java, would you be so kind to send me a link? :)
     
  15. Offline

    koda

    This is a really nice idea! Would love to have that running in my server, but i've got a suggestion, if whoever develop this could create a .properties file to set how many nights on peaceful you want and a custom message to show the players what is happening, like, when the night is no longer on peaceful it says something like: "Monsters will kick your butt this night", or "Alright, it's peaceful, you all can come out" for when the the monsters won't spawn.
    Sorry for any english mistake, iPhone keyboard + not native English speaker.
     
  16. Offline

    TfT_02

    :) This was exactly what I meant with "The plugin should have some easy configuration file with the amount of days and the text displayed in chat." I'm glad you like the idea! :)
     

Share This Page