[MECH] (CB 1438+) - Extend Day - Make Day (or Night) Last Longer

Discussion in 'Inactive/Unsupported Plugins' started by feverdream, Jan 13, 2011.

     
  1. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Extend Day extends daylight to as many "normal" days as the person has configured.
    Features:
    1. Day can now be as long as you want it to be.
    2. Day progressions as normal, but when the sun is about to set.. night is skipped and the sun rises again.
    3. Set the time your server starts in via a config file. Valid options are "day", "night", "sunset", "sunrise" or a RAW_TIME number.
    4. Night can be as long as you want it to be.
    5. Night progresses as normal, but when the sun is about to rise.. day is skipped and the sun sets again.
    6. API Support for plugin developers who want to add support to this in their plugins.

    More Detailed Description:
    For example if the admin/owner has configured it for 2 days, it will cycle two full days of sunlight before sunset is allowed to slip the server into the darkness of night. Night will happen as normal, as will sunrise. Then the day loop will start over again and 2 more "days" will pass before night happens again.

    So with "2" configured for day:
    A:
    Day
    Day
    Sunset
    Night
    Sunrise
    -> Goto A

    So with "5" configured for day:
    A:
    Day
    Day
    Day
    Day
    Day
    Sunset
    Night
    Sunrise
    -> Goto A

    So with "3" configured for night:
    A:
    Day
    Sunset
    Night
    Night
    Night
    Sunrise
    -> Goto A

    So with "5" configured for day and "3" configured for night:
    A:
    Day
    Day
    Day
    Day
    Day
    Sunset
    Night
    Night
    Night
    Sunrise
    -> Goto A

    To be implemented:
    * Permissions Support
    * Possible additional extension options, if I get a lot of requests for them.

    Version
    Bukkit #468 is last known working version. Last reported working version of CraftBukkit was #572, and as far as I know all later versions work. If you are using a older version of bukkit, please upgrade. Old versions are not supported. *puts foot down*. Current version of plugin is 1.3103252011

    Usage and need:
    I need to know how usefull this plugin is; please post here if your using it so I get an idea of how popular this is.

    API Support Usage:
    Plugin now fully supports API integration with other plugins. Use getDaysLeftCounter and getNightsLeftCounter to know how many days or nights are left in the cycle.

    The download link is here (For the jar)
    http://dl.dropbox.com/u/18627325/minecraft/ExtendDay.jar

    Example config file:
    #Extend Day Control Configuration File.
    #Thu Jan 13 14:33:09 PST 2011
    daylight-days-long=2
    nighttime-nights-long=2
    start-time day

    Possible Conflicts with other plugins:
    This plugin should not conflict with other plugins in any way as the /time command used by other plugins is per use. This plugin HAS NO /time command. However I do not have the source for some of the other popular plugins available and as the developer for these have chosen not to release the source to my knowledge, there is no way for me to support them or make sure there is no conflict. Due to this lack of source I have no idea if there is a possible conflict or not, and until I do get source - I refuse to reverse engineer jar files as that is disrespectful and just plain rude - using this plugin with others that have no released their source is not supported by me. If you want full support, get other plugin developers to release their sources.

    Other Plugins:
    If you are looking for a plugin to make it "always day" or "always night" or even "always sunrise or "always sunset" check out my "Noon" plugin in my sig.
    Daito33 and Blocksberg like this.
  2.  
  3. Offline

    SilverstarX

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  4. Offline

    DerET

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    SilverstarX likes this.
  5. Offline

    Madmusk

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  6. Offline

    SilverstarX

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    If there were "Server.getTime" errors then you used an old ExtendDay version, because now it's World.getTime ;)
  7. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    To the people passing my code around without following its license: Stop, and please delete/remove all download links to alternative version. I don't want to confuse the issue and I basically use the same reason Notch give:I don't want people bugging me about your "unofficial" versions, especially if the license I put my code under is not being followed.

    I'm updating all time based plugins to use the new api. Dropbox's is updated already so none of you has any reason to continue confusing the issue.
  8. Offline

    Redecouverte

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    -.-

    Bukkit is released under GPL
    do you even know what this means? ( it means you have to release your code under GPL, too)

    and btw, calling bukkit api from another thread is NOT SAFE , as the bukkit API is not (yet) thread-safe
    i recommend adopting my timer fix
  9. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    '
    I'm aware of the GPL, especially since I was a part of the draft community that created version 3.

    If a non-technical user gets a "unofficial" version of the plugin they will come to me and bug me about it, and out of respect I ask any other plugin developer not to put mer in that position. This is what separates the people on the forum with a "Plugin Developer" tag from the people who dont have it but still can develop plugins; its about respect.

    And for the record, I don't HAVE to do anything, I don't have to release plugins I created. I dont have to provide anything I code to the community. I choose to do so because I care.. so please, give a little respect back in return.
  10. Offline

    Redecouverte

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    if you use bukkit you have to release the source, read the GPL

    it would only work with craftbukkit as that is released under LGPL

    and stop crying around :D actually i used my time to fix your problems, so show a little respect

    and here's a little to do list:

    - use the plugin folder returned by bukkit to save the config file
    - don't go back in time, but jump forward / skip the night (reported by a user, i did not verify it yet)
    - don't call bukkit api from another thread
    - use the logger class, dont output directly to System.out

    if you want me to remove the links you have to cry to a mod , or actually be a bit nicer to me
  11. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Redecouverte your attempting to confuse the issue, and I am against that.

    I really did not want to get into this, but the GPL does nothing to give you the right to use my username, alias, or the name of my plugin so by distributing my code against my wishes using my chosen name of the plugin, you are hurting the community, and sending angry people my way for your bugs and your version of my codes issues, and yes breaking the GPL. Its like if I chose to use the name "Minecraft" for a minecraft clone; I could get sued, people would come to me blaming me for bugs in Notches code, etc.

    That is the situation here. Also, I released all my plugins/code AGPL with a BSD restriction on removing my alias as the author (they are both GPL compatible, and thus that is allowed), so technically you have not followed my license, or the GPL itself.
  12. Offline

    Redecouverte

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Our feverdream who art in the nether,
    Hallowed be Thy plugin.
    Thy java come.
    Thy will be done on earth, as it is in Minecraft.
    Give us today our daily extend day.
    And forgive us our mods.
    As we forgive those who flame against us.
    And lead us not into crashes,
    But deliver us cake.
    For Thine is the source code,
    The name rights and the GPL,
    Forever,
    Amen
  13. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    rofl.

    Dude I don't expect people to treat me as a god or anything, I'm not and I honestly dont want you to think so. But lets be clear: ALL DEVELOPERS, from plugin developers, to Bukkit Developers (some of who do both plugins and bukkit work) to Notch himself deserve to be treated with a but of respect. Actually, all people should be treated with respect, but thats not a point many people want to hear so let just stick with developer if that is all people can handle. ;)
    --- merged: Feb 5, 2011 12:30 AM ---
    In case you missed it.. yes, the plugin has been updated.
  14. Offline

    Redecouverte

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    you are still calling setTime() and stuff from another thread, this will randomly cause exceptions
  15. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This has never created an exception in any of my tests. Please provide a stack-trace.
  16. Offline

    Redecouverte

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    the chance for this varies from system to system and is highly random

    one just don't modifies non-thread safe objects from another thread, thats a very basic rule

    a stack trace would also make no sense here

    you may wan to read that:
    http://www.artima.com/designtechniques/threadsafety.html
  17. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'm well aware of the issues with threads; I asked you for a stack trace because I don't use threads in my plugin, AT ALL, and I think you may be using a version id ont support that was created by another person.

    This sounds like a bug in Bukkit, not my plugin.
  18. Offline

    Redecouverte

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    sure you are
    Code:
          this.tick = new Timer();
          this.tick.schedule(ss, 0L, this.rate);
    see
    http://download.oracle.com/javase/1.5.0/docs/api/java/util/Timer.html

    --- merged: Feb 5, 2011 1:01 AM ---
    well, that person must have hacked your github, i have taken it from there
  19. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Doh. your right for some reason I forgot I was using that class, may have been thinking of murder.

    So what your saying is they broke time, again? I have updated the plugin to use a world reference verses what I was doing before.. let me know if it helps.
  20. Offline

    Redecouverte

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    well, it has nothing to do with setTime() directly, that's all fine with your latest update

    ist just that the bukkit api classes are not thread-safe (yet), and that timer class uses its own thread to execute the run() functions of your class

    it works like 95% of time time, but that depends on system details (multi core system/java implementation/etc)
    its just the normal thread-safety issue

    if you look in the source i have posted, you'll see that it queues a console command from the timer's thread , and modifies the time with setTime() on the command callback, which solves this issue
  21. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Can you do me a favor and remove the source and links you have posted in my thread? For a new person, it will confuse them.

    Respectfully, I will not be looking at your code. I want this plugin to remain "mine" and if I use your code, that will no longer be teh case.. even if you did use my code originally.
  22. Offline

    Redecouverte

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    one might argue 95% are good enough, and i dont wanna force you to anything, i just wanted to point that out
    --- merged: Feb 5, 2011 1:13 AM ---
    i have already done that, and feel free to take my code, you can even sell it :p
  23. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I dont even have access to your code so I could not if i wanted to.

    Please update your posts in the thread, its created confusion for some people and Im getting pinged about it.
  24. Offline

    Redecouverte

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    lol, i have posted links to the source code, its still there
    and as i said before i have already done that
    --- merged: Feb 5, 2011 1:22 AM ---
    okay, so if you are not going to fix this problem, i will release my own plugin for this, i need a stable version for my server
  25. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Wtf? Now your just being disrespectful.

    I never said I was not going to fix the problem. I have given you an update I think fixes the issue; But you have not told me if it works or not.
  26. Offline

    Redecouverte

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    what kind of update?
    you are still calling setTime() and stuff from that timer thread
    --- merged: Feb 5, 2011 1:30 AM ---
    looking at your "fix" only tells me that you did not understand the actual issue:

    it is of no importance whether you call setTime() through a variable or not, the problem is: don't call it from another thread
    --- merged: Feb 5, 2011 1:33 AM ---
    +++++++++

    okay forget the issue, i just analyzed the implementation of setTime() and getTime(), as long as you only call setTime() and getTime() chances are very low it crashes, it just might corrupt the server time in a few cases
  27. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Just because I havent updated my github yet doesn't mean I haven't updated the download links file.

    Fine, I took a look at your version on a seperate computer from my sources.. and its noodle code. To make it worse, it actually calls Minecraft code and imports minecraft directly. I felt so dirty looking at it, I need to go take a shower. No plugin should ever directly import minecraft. Use bukkit! Its not just a technical layer, its a legal layer, and not using it in plugins hurts us all.

    Like i said originally: THIS IS A BUKKIT BUG. Please report it to the correct people and it will get fixed.
    --- merged: Feb 5, 2011 1:38 AM ---
    If your looking at the code for setTime/etc submit a patch to bukkit,
    --- merged: Feb 5, 2011 1:53 AM ---
    Code updated to correctly trap the thrown exception and explain the issue.
  28. Offline

    CaptainDDL

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The Bukkit team has clearly stated their position on this...plugin authors are not required to use GPL or even release their source code. Please stop harassing the people who make using Bukkit worthwhile. :)

    http://forums.bukkit.org/threads/what-license-is-the-bukkit-project-under.154/
    feverdream likes this.
  29. Offline

    jwideman

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Further, taking people's code and rereleasing it obliges you to follow the terms of the GPL as well. What this basically means is that after "fixing" feverdream's plugins for him, Redecouverte, you have to provide your forked source. And if feverdream wants to merge your changes back in... well, that's his prerogative.
  30. Offline

    feverdream

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Bukkit is released in the GPL. The Bukkit teams official stance on this is plugin developers don't have to do squat and are not forced to release source code; I do it anyway because I'm a nice guy.

    I also only release my code under a AGPL license and BSD license mix that is COMPLETELY COMPATIBLE with the GPL, meaning all my source code is under the GPL, the AGPL, and the BSD license. This is perfectly legal, and means that in addition to the obligations created by it being GPL - having to give out code - you also have to:
    • Keep my "coded by" stuff in the code.
    • Add something to the effect of "this uses Feverdream's code" to our coded by/credits.
    • If you use my code/plugins on your server, and somebody uses your server, they have the same entitlement to the source you do. You cant for example sell access to a service that uses my plugins, and not give out the code for that service. You have to.
    • Remember that your code must be released under this mix as well.

    The guy who had modified and distributed my plugin without permission or even following the licence fully had a version of the code that actively imports and uses Notches code by calling minecraft - yes, Notches Code - directly; I'm against this as it does everything the craftbukkit team is trying to do by making bukkit a interface to gain legal protections and that hurts EVERYBODY using Craftbukkit. I also dont consider people taking my plugin code and not even using the bukkit interface to be "cool".

    Just so people know, I just attempted to file a bug report with bukkit to get the interface fixed so this rare bug that hardly ever hits anybody will no longer be an issue at all, but they seem to be having issues with permissions on it at this time. I'm sure it will be fixed soon, but until then this issue did not affect many people and it doesn't do anything at all even if did it now that I have updated the plugin to mitigate the risk.
  31. Offline

    QQCucumber

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Redecouverte, I really appreciate your contributions that kept ExtendDay working during feverdream's absence. I do hope to see your own plugin released soon. :)
  32. Offline

    davidbullship

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Regardless does this extend night as well? I'm getting mixed signals or not reading everyone clearly.

Share This Page