[RPG] LoreTime v1.3.0 - A date plugin for RP servers [1000]

Discussion in 'Inactive/Unsupported Plugins' started by SHiLLySiT, Jul 31, 2011.

  1. Offline

    SHiLLySiT

    <font color="rgb(255, 0, 0)">>></font>BUKKIT DEV: http://dev.bukkit.org/server-mods/loretime/<font color="rgb(255, 0, 0)"><<</font>
    All further updates will be made to the above link.

    LoreTime - An RP date plugin:
    Version: v1.3.0

    LoreTime is a date plugin geared towards RP servers. When a player issues the /loretime command, they are given the current in-game date which can be customized to fit the server's theme. Admins can adjust the date in-game as well as save/reload the config. The plugin updates the date at midnight in-game time (18000).

    With our standard calendar:
    [​IMG]
    With Oblivion's Calendar:
    [​IMG]

    Note: Days in a month must be divisible by the days in a week, a limitation I hope to remove in the future. You may notice that the 31 of July this year is actually Sunday, this is because of the aforementioned limitation.

    Features:
    * custom month/day names
    * in-game time
    * custom formatting
    * user specified days in a week/months in a year
    * permission support (Optional)

    <Edit by Moderator: Redacted mediafire url>

    <Edit by Moderator: Redacted mediafire url>
    Source Code

    Changelog:
    Version 1.3.0
    * added time display
    * added custom string format

    Version 1.2.0

    * fixed another memory leak (doh!)
    * added time check interval (configurable)
    * added "th", "nd", etc after date numbers
    * chat color (configurable)
    * notify players on date change
    * notify players on login (optional)
    * reorganized code/comments/cleanup

    Usage:

    Config
    Code:
    months:
         #Names of your months. The number of months you list here reflects the
         #number of months in a year.
        - January
        - Febuary
        - March
        - April
        - May
        - June
        - July
        - August
        - September
        - October
        - November
        - December
        #The current day (zero based). Don't worry about this, just for storage.
        current: 0
        #The number of days in a month. Days in a months must
        #be divisible by the days in a week.
        daysInAMonth: 30
    days:
         #Names of your days.  The number of days you list here reflects the
         #number of days in a week.
        names:
        - Sunday
        - Monday
        - Tuesday
        - Wednesday
        - Thursday
        - Friday
        - Sunday
        #The current day (zero based). Don't worry about this, just for storage.
        current: 0
    year:
        #The current year (zero based). Don't worry about this, just for storage.
        current: 0
    options:
        #The name of the world to keep a date, only supports one world.
        worldname: world
        #The interval to check the time (in seconds). Longer intervals reccomended
        #for higher populated servers, but default should be fine
        interval: 30
        #Color of all loretime related chat messages. Use upper case!
        #BLACK, DARK_BLUE, DARK_GREEN, DARK_AQUA,
        #DARK_RED, DARK_PURPLE, GOLD, GRAY, DARK_GREY, BLUE,
        #GREEN, AQUA, RED, LIGHT_PURPLE, YELLOW, WHITE
        color: AQUA
        #Save the config to file after the date changes? (recommended)
        saveOnDateChange: true
        #Notify players of the date when they join the server?
        NotifyOnJoin: true
        #Turn debug messages on.
        debug: false
        #How the string will be displayed
        #&W = weekday name, &M = month name, &D = day number, &Y = year,
        #and &T current time.
        displayString: '&W, &M &D, &Y'
        #Either type 12 for 12-hour clock or 24 for 24-hour clock
        timeformat: 12
    
    NOTE: You can add additional words to the display string. For example, if the day is Monday and the month is January the string "Today is &W of &M" will output as "Today is Monday of January".

    Commands
    (Alias to /loretime is /lt)
    /loretime - displays the current date/time
    /loretime time - displays the current Minecraft time.
    /loretime set [month] [day] [year] - sets the date to the specified date.
    /loretime save - saves the date to file.
    /loretime reload - reloads the config file without saving first.

    Permissions
    loretime.user.loretime - /loretime
    loretime.user.time - /loretime time
    loretime.admin.set - /loretime set [month] [day] [year]
    loretime.admin.save - /loretime sav
    loretime.admin.reload - /loretime reload

    Bugs:
    Version 1.3.0
    * none known

    Version 1.2.0

    * none known

    Version 1.1.1

    * memory leak

    Version 1.1.0

    * I've been told there is a memory leak some where, working on the fix.

    Version 1.0.0

    * none known

    Future:

    * Holidays/Events
    * I'm taking suggestions! =]

    Changelog History:


    Show Spoiler
    Version 1.3.0
    * added time display
    * added custom string format

    Version 1.2.0

    * fixed another memory leak (doh!)
    * added time check interval (configurable)
    * added "th", "nd", etc after date numbers
    * chat color (configurable)
    * notify players on date change
    * notify players on login (optional)
    * reorganized code/comments/cleanup

    Version 1.1.1

    * fixed memory leak (let me know if it still persists)
    * removed config save when /lt time command was issued (oops)

    Version 1.1.0

    * added /lt alias
    * added /lt time which returns the current time

    Version 1.0.0

    * initial release
     
    Last edited by a moderator: Nov 13, 2016
    kahlilnc and aima like this.
  2. Offline

    ChrizC

    Missing plugin description in title.
     
  3. Offline

    SHiLLySiT

    Oops, fixed! =]
     
  4. Offline

    Hackuss

    Maybe add shortcut (ex /lt...) and time in server
     
  5. Offline

    SHiLLySiT

    Ah, good idea. I will patch it sometime today.

    [EDIT] Updated! =]
     
  6. Offline

    availer

    Great plugin!
     
  7. Offline

    SHiLLySiT

    I originally made this for Lord of the Craft but it seems you guys beat me to it with the update today. =[

    Never mind! You are using my plugin, thank you for the comment. =]
     
  8. Offline

    SHiLLySiT

    Version 1.2.0 has been released.

    New features have been added and a major memory leak has been fixed.
     
  9. Offline

    Plague

    Sorry for the delay in submission approvals, I've been away for a while.

    I love bethesda RPGs, very nice plugin :)
     
  10. Offline

    gameswereus

    This is a really cool plugin.
     
  11. Offline

    aima

    i like it a lot cant wait for the update for formatting date options i hope that this means we get to chose if we display the month or year at all.

    I'm looking for something that gose only by week days monday tuesday type of thing also I'm looking for something that will display the in game time 12hr time or 24hr time but that would be my wish list also a easyer command for viewing game time /worldtime or /wt
     
  12. Offline

    SHiLLySiT

    In-game time might be a little difficult as it's possible for it to cause major performance drops. I'll look into ways of simply converting MC time. I should have an update out this week, if not sometime today.
     
  13. Offline

    kahlilnc

    Being able to change the messages would be nice. :D

    Oh and being able to make it more likely to rain during one season.
    And IK this is like season the plugin but it doesnt have a calender. :D Like this.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  14. Offline

    SHiLLySiT

    What messages? The only one that really matters is the date string which will be customize-able after the next update.

    Weather control feels a little out of the scope of this plugin, but I'll take a look. My plugin is open source, so someone else could always implement it need be.
     
  15. Offline

    kahlilnc

    Update coming soon?
     
  16. Offline

    SHiLLySiT

    Updated!

    Version 1.3.0
    • added time display
    • added custom string format
    Didn't get to weather or holidays/events. I will look into it in the future, but now I must get started on my Ludum Dare entry. Please let me know if there are any bugs or confusion with the new features added.
     
    kahlilnc likes this.
  17. Offline

    JayTheManiac

    Code:
    07:57:57 [SEVERE] java.lang.NullPointerException
    07:57:57 [SEVERE]       at me.SHiLLySiT.LoreTime.LTimeCheck.run(LTimeCheck.java:
    25)
    07:57:57 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftWorker.run(Craf
    tWorker.java:34)
    07:57:57 [SEVERE]       at java.lang.Thread.run(Unknown Source)
    07:58:00 [INFO] JayTheManiac [/24.121.155.41:50012] logged in with entity id 216
     at ([City] 196.40625, 80.0, -239.25)
    07:58:00 [SEVERE] Could not pass event PLAYER_JOIN to LoreTime
    java.lang.NullPointerException
            at me.SHiLLySiT.LoreTime.LCommands.getTime(LCommands.java:18)
            at me.SHiLLySiT.LoreTime.LCommands.displayString(LCommands.java:87)
            at me.SHiLLySiT.LoreTime.LPlayerListener.onPlayerJoin(LPlayerListener.ja
    va:19)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:244)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:338)
            at net.minecraft.server.ServerConfigurationManager.c(ServerConfiguration
    Manager.java:124)
            at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
            at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    07:58:06 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'lore
    time' in plugin LoreTime v1.3.0
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:12
    9)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:3
    52)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:737)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
            at me.SHiLLySiT.LoreTime.LCommands.getTime(LCommands.java:18)
            at me.SHiLLySiT.LoreTime.LCommands.displayString(LCommands.java:87)
            at me.SHiLLySiT.LoreTime.LCommands.executeCommand(LCommands.java:113)
            at me.SHiLLySiT.LoreTime.LoreTime.onCommand(LoreTime.java:49)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    07:58:14 [INFO] JayTheManiac lost connection: disconnect.quitting
    07:58:14 [INFO] Connection reset
    07:58:28 [SEVERE] java.lang.NullPointerException
    07:58:28 [SEVERE]       at me.SHiLLySiT.LoreTime.LTimeCheck.run(LTimeCheck.java:
    25)
    07:58:28 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftWorker.run(Craf
    tWorker.java:34)
    07:58:28 [SEVERE]       at java.lang.Thread.run(Unknown Source)
    D: I got that when i tried to load it.
     
  18. Offline

    SHiLLySiT

    What is your interval set to? You are running v1.3.0 correct?
     
  19. Offline

    JayTheManiac

    Interval? Where would i find that? >.<" And yes i am running 1.3.0
     
  20. Offline

    aima

    I got the update the other day work fine and like the date format and time options its just how I wanted it.

    Only few issues with change over but that not your problem my own really I uploaded it first then shut down the server witch saved over the newly upload config with the old one guess it need to save the current date to the config file on server shut down that reset it back to the old config

    The other thing i think is the file name should be just loretime.jar with out the version info so don't have to look for the old one and remove it from the plugin folder it will just replace it may prevent problems in the future updates you do and also add a command to see the version.

    things i think you should do in time is make it more a time and event management that allows you to set week days or months in game time to have game events that works with other plugins like iConomy worldguard

    Things you could do is add tax system for taxing players every month or year in game for them players that make lots of money make them pay a set amount of tax,

    A wealfare system that pays the poor for being to poor say once a month and have a cut off point if they made too much.

    other ides was player in game birthdays so players when the player joins the server for the first time will record it and when its the same time next year in game time will give them a item or cash reward with iconomy also puts a message into the server for everyone to see

    another ider I had was land tax so if you have world guard plugin you could make players pay land tax on their land for (x) number of days or months if thay own a region or more then one

    maybe also allow admin to set events to give them set permissions nodes so you can give them access to superpick or something like that on a week day or once a month in game time.

    also a in game lotto that will call out each week or month in game as well as jackpot each time a user dose not win also a lotto system that the user has to select a number between 1 and x value

    I have lots more but them are some of the big things I want in my server one day i hope this may help give you some more ides yourself.
     
  21. Offline

    kahlilnc

    In the config.
     
  22. Offline

    SHiLLySiT

    Wow that is a mighty list of very good suggestions. I hadn't intended the plugin to be so feature rich, but that does sound interesting. It also hadn't crossed my mind about the file names, I'm going to start throwing them in ZIP files and taging the zip files with the version number. I'll try to implement what I can when I get a chance to sit down for a length period of time. Thanks for the suggestions!

    Were you able to get the plugin working?
     
    kahlilnc likes this.
  23. Offline

    kahlilnc

    XD I like it. the suggestions that is.
     
  24. Offline

    ashtheking

    I'm going to fork this and add support for other plugins and perhaps make an Register based Paycheck plugin with it after I do that.
     
  25. Offline

    SHiLLySiT

    Awesome! I will be looking forward to what you do with it. =]

    I will still continue to support/update the main branch.
     
  26. Offline

    ashtheking

    Almost done, just testing it with a payment plugin!
     
  27. Offline

    kahlilnc

    Works for me on 1060. :D
     
  28. Offline

    T4L_Goose

    Only problem I have with this is that Minecraft days are actually 20 minutes long and not 24, so the hours get a little mixed up. It was 12:00pm when the sun was coming up, when before it was in the am's when the sun was rising.
     
  29. Offline

    ashtheking

    Done, check your pull requests. @SHiLLySiT
     
  30. Offline

    SHiLLySiT

    @ashtheking Sorry about the delay; didn't get an email and I've been busy the past week. I'm also new on GitHub. ;]

    @T4L_Goose I'll have to look into that.
     

Share This Page