[INACTIVE][INFO] Calendar v1.51 - Track the Days [271]

Discussion in 'Inactive/Unsupported Plugins' started by Multimac, Jan 27, 2011.

  1. Offline

    Multimac

    Description:
    This plugin allows for players to see exactly how many days have passed since the creation of the world.

    Features:
    • Server broadcasts message at the beginning of each day.
    • Use commands to get information about today.
    • Ability to customize daily message.
    • Add events for certain days (in Calendar\\events.data).
    • Change the name of each day and month (in Calendar\\calendar.data).
    • Event hooks for each new day.
    Commands:

    All commands are under /c
    • /c date - Gets the current day.
    • /c time - Gets the time.
    Date Format:
    There are 7 properties that can be used when customizing the date format, these are:
    • %dd - Prints the current Day.
    • %dddd - Prints the Day of the Week.
    • %wd - Prints the Day of the Week as a Number.
    • %ww - Prints the Week number.
    • %md - Prints the Day of the Month.
    • %mm - Prints the current Month.
    • %yyyy - Prints the Year number.
    Here are some example formats:
    Show Spoiler

    Example: %dddd, %md of %mm, %yyyy
    Prints: Saturday, 15 of June, 2

    Example: Day %wd, Week %ww
    Prints: Day 4, Week 14

    Example: %md/%mm/%yyyy
    Prints: 15/June/2

    Example: Good Morning, Today is day %dd
    Prints: Good Morning, Today is day 103

    Example: Today is day %md of the month of %mm, year %yyyy
    Prints: Today is day 15 of the month of June, year 2

    Event Hooks:
    To use the hooks in this plugin, simple create a class which extends the CalendarListener class, and call AddCalendarListener, passing it your CalendarListener.
    When this event is fired, it passes a CalendarEvent. The CalendarEvent contains the total number of days which have passed (as a long), and the current day of the week (as a String).


    To Do:

    • Add commands to get date and time of day.
    • Add the ability to set events on certain days and at certain times.
    • Add event hooks for other plugins.
    • Change to allow for specific dates (ie. 23rd June, 2013).
    • Add in any extra features suggested
    Installation:

    1) Extract the Calendar.zip and copy the Calendar.jar and Calendar folder into your plugin directory.
    2) Run your server.
    3) Open the calendar.data in the plugin\Calendar directory.
    4) Edit any of the properties, or just leave them as they are.


    Changelog:
    Show Spoiler

    v1.51
    • Fixed bug with /c date command.
    v1.5
    • Added event hooks for other plugins.
    • Added customizable events (in Calendar\\events.data)
    • Added ability to customize the format of the daily message (DateFormat in calendar.data)
    • Added the CustomDate property. Leave false to use a default 'earth' date, or set to true if you want a custom date.
    v1.22

    • Forgot to change some parameters i use for debugging (should only be a problem with v1.2 and v1.21), all fixed now.
    • Removed code leftover from attempted custom events.
    v1.21


    • Updated to work with latest build of Craftbukkit (build 271).
    v1.2


    • Fixed bugs in creating the date.
    • Changed calendar.data to include 4 new properties (showdayname, showweek, showmonth, showyear).
    v1.15


    • Fixed null pointer exception when getting date.
    v1.14


    • Fixed an error in the new version of bukkit in getting the time.
    v1.13


    • Fixed command bug.
    v1.12


    • Fixed date not being in correct format when using /c date.
    v1.11



    • Changed path location, hopefully fixing error on Linux.
    v1.10



    • Implemented customisable days and months.
    v1.01


    • Fixed a couple of numbers.
    • Implemented commands.
    v1.00


    • Initial release.
     

    Attached Files:

    Riot and mezzamorta like this.
  2. Offline

    Multimac

    Oh, because of all the changes to the worlds (allowing for multi-worlds) they had changed a few things the calendar relied upon. The latest version should fix that bug.

    As for the custom date, i'll add that in ASAP, but until then the latest version includes a template calendar.data file which has a generic date format in it.
    And i'll see what i can do about custom events, shouldn't be to hard, should it?
    --- merged: Feb 8, 2011 5:54 AM ---
    Sorry, this was me trying to find errors in the plugin. If you download the latest version it will all be fixed.
    --- merged: Feb 8, 2011 9:52 AM ---
    There we go, version 1.5 now has custom events, customizable date formats, the CustomDate property (credit goes to MintyAnt), and event hooks.
     
  3. Offline

    axebyte

    what would i usein the event area, so it recycles every year?
    i seen your defual 1/1/2:Happy New Year will this repeat every year??
     
  4. Offline

    Nick Stevens

    Much better Multimac, thanks. :D Just one issue I have now is that I'm getting 0 as day of the month??
     
  5. Offline

    Benjamin Groves

    Thanks Multimac - Version 1.5 clears up my questions.
     
  6. Offline

    madflavius

    I have the same question as axebyte: do the events repeat yearly by default? How do you set them to default yearly?
    If not, can this feature be added?
    --- merged: Feb 8, 2011 8:58 PM ---
    Also, as Nick Stevens pointed out, the months begin on day 0 instead of 1; a fix would be much appreciated. :)
     
  7. Offline

    Nick Stevens

    Also I just had my date go from "Monday, 0 of January, 1" to "Tuesday, 28 of November, 1".
     
  8. Offline

    madflavius

    In regards to what Nick just said, I think I see the problem. The automatic messages are updating properly at midnight, but if you use the command "/c date" it seems to be stuck at the default.
     
  9. Offline

    Multimac

    Ahh, must have broken that somewhere down the line. It should be better now.
    --- merged: Feb 8, 2011 10:38 PM ---
    I'll get to work on adding in event repetition now.
     
  10. Offline

    Tar

    Somehow, the plugin resets my edited calendar.data back to normal (normal weekdays and monthnames) everytime I type /c date or the day changes. It just overrides the complete file with the default calendar.data. What's wrong?
     
  11. Offline

    Multimac

    do you gave CustomDate on or off?
     
  12. Offline

    Mike24

    1+1=2 :D
     
  13. Offline

    Tar

    It's set to true.

    Content of my (wanted) Calendar.data:
    Tried it with HotSwap and with rebooting the server, file gets overritten everytime.
     
  14. Offline

    mutiny

    Daily:End of the Day
    Yearly:1/1:Happy New Year
    Yearly:2/2:GroundHogs Day!
    Yearly:31/10:Halloween
    Yearly:25/12:Christmas
    Yearly:17/1:Martin Luther King Jr Day
    Yearly:30/5:Memorial Day

    These events dont load, it appears i am using the same format you did, what did i do wrong


    error in console x 6 = Could not read event from file
     
  15. Offline

    Azraeil

    Not sure if it's been addressed yet, but it seems that the days being updated is still broken. I'm running the recommended build #53 and it seems to update every minute or so.
     
  16. Offline

    tarto

    Code:
    2011-02-22 12:22:36 [INFO] Could not read event from file
    2011-02-22 12:22:36 [INFO] Could not read event from file
    2011-02-22 12:22:36 [INFO] Could not read event from file
    2011-02-22 12:22:36 [INFO] Could not read event from file
    
    I get those error when loading plugin, but files are readable (755), i don't understand what I did wrong.
     
  17. Offline

    crazydog

    Nagging!
     
  18. Offline

    crazydog

  19. Offline

    Lance

    Is this plugin going to be updated or is it dead?
     
  20. Offline

    gmerindol

    Yes, please
     
  21. Offline

    Viktor

    got a could not load error how do I fix?
     
  22. Offline

    TrueEdge

    Can you please stop using " the stupidly long constructor com.bukkit.Multimac.Calendar.Calendar(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader)" it "is no longer recommended."......"(Nothing is broken, we just like to keep code clean.)"

    Thanks. =)
     
  23. Offline

    Sol

    Does not work with build 493.

    Throws up a huge error, too large to go in to at this stage. Can post later if needed but I highly doubt this plugin will ever be updated.

    ~Sol
     
  24. Offline

    Lance

    Too bad. He was last online this Tuesday. I guess not even the decency to say it's a dead plug-in. What are our alternatives? I didn't find anything. :\
     
  25. Offline

    Riot

    This is a great plugin @Multimac . I was wondering If I could distribute a fixed version of this plugin with your permission of course. I strung and killed all the errors, except one which won't die. The bug is hiding somewhere in Calendar.java in the function
    Code:
    LoadCalendar();
    . Won't distribute it until I fix it and with your permission.

    Developer notes: call
    Code:
    pm.registerEvent(Event.Type.PLAYER_COMMAND_PREPROCESS, this.playerListener, Event.Priority.Normal, this);
    Also instead of onPlayerCommand:
    Code:
    public void onCommand(PlayerChatEvent event)
    You declared nextLine too many times within a function. And commands needed specification and initialization in the plugin.yml file.
    Enjoy!
    --- merged: Mar 4, 2011 2:19 PM ---
    Simple fix in code and done. One more bug to step on, but it doesn't make any sense.
     
  26. Offline

    tickleman

    Hi Multimac.
    Your plugin is so great. Now people know how old is the World on my servers !

    But I need updates for your plugin to work with the newest versions of craftbukkit...
    If you don't have the time to do this, I can do the job and send the release + the source back to you, and update them in this topic. Would you ?

    Please, help us ! What will we become without that great simple little calendar plugin !!!


    (I'm the developper of the RealShop plugin, be sure I will do what I said !)
     
  27. Offline

    Riot

    Then do it and help a few pals out here. Meanwhile if its already fixed then post the link.. given that you know how to disassemble java right? Dissassemble-->Update--->Post. Great, thanks.
     
  28. Offline

    tickleman


    I don't know disassembling java... and I haven't the right to do this if Multimac does not agree, as this is his program !
    Waiting for what he'd say. Multi ? [​IMG]
     
  29. Offline

    Riot

    You can't help the community if you don't have the source so grab a dissasembler. You can play around but cant redistribute without his OK is all.
     
  30. Offline

    tickleman

    I'm waiting for his OK. I just need it and I do.
    Or perhaps will he come back to his project and help us ? Perhaps on holidays now, he didn't visit us since Tuesday...
     
  31. Offline

    Nick Stevens

    I have disassembled the old plugin and updated it for the current CraftBukkit to run on my server but as Baptiste points out though, it would be a bit off to redistribute it without Multimac's okay. We can only assume that due to the fact he didn't provide the source in the first place he was not okay with other people using his code. Shame really as it's a cool little plugin.
     

Share This Page