[MECH] Helios v0.6 - A simple daytime/nighttime plugin [1000]

Discussion in 'Inactive/Unsupported Plugins' started by flAked, Mar 23, 2011.

  1. Offline

    flAked

    Helios v0.6
    Download Helios.jar

    Tested on
    CraftBukkit #1000
    MC 1.7.3

    Description
    Helios is a simple daytime (nighttime) plugin that always looks on the bright (dark) side. It is activated per default and will make coffee for you in the morning (evening).

    Features
    Why should I praise Helios (the sun god from the greek mythology)?
    • Drop & Play, no configuration needed
    • Multiworld support
    • Nether plugin compatible
    • Praise Selene to get a nighttime plugin
    • CraftBukkitUpToDate support
    • Uses setTime() to advance to the next day, keeping day cycles intact and growings steady (time glitching with setFullTime() is dangerous!)
    Commands
    /praise [helios/selene/none] - activates a timegod

    /helios [on/off/status] - [de-]/activates plugin, shows status

    Omitting parameters will show a usage description.

    Multiworld support
    Helios now fully supports Multiworld! For that reason the commands are slightly tweaked.

    The /helios command allows you to globally deactivate the plugin, so it won't set the time on any of your worlds. If you use the /praise command it will show that the gods are pleased and save the setting, but it won't set the time unless you activate the plugin again.

    The /praise command let's you select the timegod as before, but will do so only in the current world. You can praise none and effectively disable the plugin for certain worlds.

    The default settings will start the plugin and activate Helios on all worlds at the beginning.

    To create the new configuration file, start and quit the server. You can manually edit the YAML file in "/plugins/Helios" as long as you obey the formatting. Or simply log into the worlds which you'd like to disable and type "/praise none".

    Planned features
    - Global commands to set the status of any world directly
    - Timegod world overview on /helios status command

    Changelog
    v0.6
    • Fixed a bug where the status was overwritten on server shutdown
    • Changed the behavior on reactivation of the plugin to not reset the sun/moon
    v0.5
    • Full Multiworld support & configuration
    • Remember plugin state
    • Simplified commands
    • Color formatting
    v0.4
    • Added support to praise Selene!
    • Compatibility fix for Nether plugins
    • Changed command interaction
    • Update to #740
    v0.3
    • Changed morning/evening times
    • Changed command to ingame players only
    • Update to #670
    v0.2
    • Fixed command bug
    • Update to current Bukkit
    v0.1
    • First release
     
    AS1LV3RN1NJA and p0rnflakes like this.
  2. Offline

    ZachBora

  3. Offline

    flAked

    Well, conceptually it does the same thing. But I find it overly complex and convoluted.

    I wanted something simple for my private server, without more configuration and overhead.

    The plugin just sets the time to morning and will keep doing that when it gets dark - simple as that, no typing at all.

    All the other simple daytime plugins are outdated/not maintained, so I wrote my own.

    The codebase is very simplistic as well, one class with ~120 lines of code. Less complexity, less bugs.

    If you guys are interested, I will post this and the source at github.
     
  4. Offline

    ZachBora

    Just wondering if someone changes it to night with another plugin if this plugin will keep it day. Just regular /time night plugins, not talking about timeshift.
     
  5. Offline

    flAked

    Not quite sure I understand you correctly, are you looking for a simple nighttime plugin then?
     
  6. Offline

    ZachBora

    I don't really need your plugin, just thinking about getting information out of you for others that might look at it.

    Right now if you're using Timeshift day (which is like your plugin) and someone tries to force night using /time night it stays day because of timeshift plugin. I am just wondering if your plugin does the same. Does it put it to day when it arrives at time X or does it verify if the current time is between Dawn and dusk.
     
  7. Offline

    flAked

    I believe it's the same "bug" (I don't know if this is intended by the authors, I think not) as in ExtendDay, where your predefined cycles would only start after one full day/night time.

    Since daylight is shining from 0 to 12.000 using getTime() I just check if the current time is past that and set the time to 0 (morning) again. By using setTime() instead of setFullTime() the time will progress to the next day and will not warp the time back.

    This will happen instantly, so it doesn't matter when you activate Helios (it's activated on the start, but if you deactivate it some time in the day). Let's say you are at 20.000 (night) and then activate it again, it will set the time to 0, progressing to the next morning.

    The full cycle goes from 0 to 24.000.

    Hope this answers your question.
     
  8. Offline

    Nicholas Giaimo

    Post source please :) About to start attempting to write plugins so I am checking out source codes. This sounds nice and simple and would love to look at it. Thanks!
     
  9. Offline

    jaZz_KCS

    mmh, tested it with v556, but whenever i type "/helios on" the console answers "USAGE: /helios on/off"
    and when i try it in the server console directly he states the same. also, when i only eneter "helios", it gives out a bunch of errors in the server console..

    ?
     
  10. Offline

    flAked

    There is a bug with the command-handling atm, I will release a new version with current CraftBukkit shortly.

    Helios is activated by default, so it should be on already.
     
  11. Offline

    registered

    I am testing on v609, and helios doesn't seem to work anymore. Not only is there the command handling bug, but also it doesn't automatically set time to 0 anymore. (Unless I disable and renable it, then it sets the time to something around noon, and then stops working again).
     
  12. Offline

    flAked

    Please check if the problem still exists with v0.2.

    EDIT: getTime() was bugged, please update to current CraftBukkit!
     
  13. Offline

    Kalexer

    Doesn't work for me, using v0.2 on Craftbukkit #617.
    Always getting "Unknown console command. Type "help" for help." on the console and a message about not being op ingame.. Any chance to debug this?
     
  14. Offline

    flAked

    Are you using any sort of remote plugin to control your server? Are you actually an OP ingame?
    Is the plugin functional per se, is Helios kind enough to rise again if it's getting dark?
     
  15. Offline

    PhantomGamers

    Any chance you can switch it from 12000 to 11000?
    12000 IS still day but that's when it starts getting dark.
    11000 is completely bright.

    Just a suggestion.
    Tried changing it myself but I'm terrible at coding...
    Maybe just add a config file or something? :eek:
     
  16. Offline

    flAked

    Sounds good, maybe change the start as well? What would be a good time?
     
  17. Offline

    PhantomGamers

    Uh, I would say the start is alright as it is... but 0 does tend to bug out with the GLSL shader mod.
    I would say 900 is a good number for that issue.
     
  18. Offline

    Kalexer

    Not using any sort of remote plugin, being an OP and it does *not* work per se. :(
    Would really love to get this work.
    Beside of Helios I have installed: HomeX, MultipleHomes (they work parallel) and TelePlus, if that helps.
     
  19. Offline

    flAked

    A new version is out, I changed the command-handling so that only ingame players are allowed to use it. Maybe that fixes it for you.

    I'll try to replicate your environment, I only have Essentials in use right now and it's working fine for me. Stay tuned.

    EDIT: just did a test with your plugins and all is working fine for me.
    However, TelePlus is superseded by http://forums.bukkit.org/threads/tp-tele-v1-3-2-full-featured-teleportation-suite-617.8977/.

    Try to update your server to CraftBukkit #670.
     
  20. Offline

    Kalexer

    I just upgraded to #670 and applied your latest helios, it works now.
    Thanks for your efforts, keep up the good work.
     
  21. Offline

    PhantomGamers

    It would be awesome if this plugin had a nighttime option.
    I do believe the Greek God of the Moon is Artemis.

    Night is completely started at about 14500 and ends at, I would say, 22000.
    Not sure how you would make it toggle though.

    /timegod helios
    /timegod artemis
    :p
     
  22. Offline

    flAked

    Could be:

    /praise [on/off] globally, depending on the choice of
    /praise [helios/selene]

    Thoughts? Ideas on how to make the commands more immersive (not using on,off)?

    I believe Helios and Selene are titans, whereas Apollon and Artemis are olympic gods :)
     
  23. Offline

    paccer

    i'd also recommend/request that the /helios command (or whatever it will be) also shows the current status (on/off)
    (or add a "/helios status")
     
  24. Offline

    GameFreakDude

    Unfortunately, this seems to conflict with NetherPortal (and possibly similar plugins) that attempt to always make it night in the nether :< is this fixable?
     
  25. Offline

    flAked

    I could check if World.getEnvironment() == NETHER and disable Helios for that world. But I don't know if NetherPortal uses this variable. From the looks of it, the world create command in NetherPortal does, any insight?

    EDIT: ok, just checked the source-code, it will work this way and multiple worlds are still possible. Will be included in v0.4 tomorrow. Thanks for the suggestion.
     
  26. Offline

    PhantomGamers

    Maybe instead of disable, just force night in nether?
    The plugin I have for nether right now doesn't force night itself :S
    Kinda kills the atmosphere.

    And tomorrow (.4) will include the /praise selene/helios command too? :D?
     
  27. Offline

    GameFreakDude

    Oh my goodness, that was a fast reply. Thank you so much!
     
  28. Offline

    flAked

    Well, it is a time-plugin, but I think this would be out of the scope of this plugin, other Nether-plugins may change the time too and I cannot check/maintain every plugin-combination. Leaving the Nether alone for Nether-plugins seems like an elegant solution.

    And yes I'll add the new commands as well later today.
     
  29. Offline

    jamescosten

    Simple Plugin, Koodo's Works great, now i can build in complete daylight...

    Here's a [diamond]
     
  30. Offline

    PhantomGamers

    W00t, this plugin works great on the latest 1.5_02 build!
     

Share This Page