[INFO] FirstLastSeen v0.10 - Track first join and last part times [1.1-R4]

Discussion in 'Inactive/Unsupported Plugins' started by NuclearW, Jun 22, 2011.

  1. Offline

    NuclearW

    FirstLastSeen - Track first join and last part times
    Version: v0.10

    FirstLastSeen keeps track of a players first join time, and their last logout/kick time, and provides simple commands with which to access that data.

    FirstLastSeen also has the ability to important firstseen and lastseen times from Towny, to do this enabled ImportTowny in the config file, once complete it will disable ImportTowny again.

    FirstLastSeen supports and is tested with PermissionsEx. FirstLastSeen also supports default Bukkit Permissions! And will support any permissions plugin that does the same. FirstLastSeen also tentatively supports Permissions 2.7.4 and 3.1.x, but is not tested against these.

    Translation can be accomplished with the lang file the plugin will create, simply change the wording and place the <date> and <player> tags accordingly.

    FirstLastSeen has been translated into German, Spanish, and Polish:
    FirstLastSeen will broadcast a message to your server when a player first joins. To modify or disable this feature, simply edit the string in the "lang" file.


    If you translate this plugin I would be very grateful if you would send me your lang file so that I may share it with others in this post.

    Features:
    • Logs first join time.
    • Logs last part time.
    • Announces a player's first join.
    • Can import times from towny.
    • Lets server owners edit their first join times all the way back to the age of disco!
    • Impartial name targeting for online users, exact name searching for the offline.
    • Translation file to let you change the messages to whatever language you require.
    • Supports PermissionsEx, Permission 2/3, Bukkit Permissions, and defaults to OP.
    • Has a static methods API to allow other plugins to access FirstLastSeen data easily.
    Commands:
    • /firstseen [player] - Displays first join date for that player
    • /lastseen [player] - Displays last part date for that player
    • /seen [player] - Displays both first join and last part date for that player
    Permissions:

    Nodes (open)

    • firstlastseen.* - Implies all other firstlastseen permissions nodes.
    • firstlastseen.firstseen - /firstseen
    • firstlastseen.lastseen - /lastseen
    • firstlastseen.seen - /seen


    API:

    For Developers (open)

    FirstLastSeen contains two static methods in its main class "FirstLastSeen", they are "getFirstSeenLong(String playerName)" and "getLastSeenLong(String playerName)"

    To use these, you must do the following:
    • Add FirstLastSeen to your "depend" in your plugin.yml
    • Add the FirstLastSeen.jar to your build path
    • Call FirstLastSeen.getFirstSeenLong or FirstLastSeen.getLastSeenLong whenever you need it!
    The long data returned is of the same type as System.getCurrentTimeInMillis();, which is to say it is the unix timestamp in milliseconds.

    FirstLastSeen's methods will return -1 when it encounters an error, or when there is no data, so be sure to check for -1 on your returned long!


    Download FirstLastSeen

    Changelog:
    • Version 0.10
      • Updated for new event system
    • Version 0.9
      • Added static methods API to allow FirstLastSeen data to be easily accessible by other plugins.
    • Version 0.8
      • Now adds players on first load who were already in the server.
      • Now with ability to color messages in the lang file with the & color codes
    Older versions (open)

    • Version 0.7
      • Supports Bukkit Permissions and Permissions 2/3
    • Version 0.6
      • Added announce to server on first join.
    • Version 0.5
      • Fixed a bug on unix-based hosts relating to file duplication in my fix for case-insensitivity.
    • Version 0.4
      • Case-insensitive searching of players.
    • Version 0.3
    • Version 0.2
      • Multi-language support added
    • Version 0.1
      • First release.
     
    AS1LV3RN1NJA and MrConfig like this.
  2. Offline

    spunkiie

    REQ: Please add custom messages.

    I will for sure use it on my 300+ server :)

    TY
     
  3. Offline

    EvilPeanut

    A Nice Toy, But What is The Point in it? :D

    Thinking about it, thats pretty awsome! :D
    Thanks for making this, im pretty sure this is an original idea! :D
    Il have to try it out :)

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

    NuclearW

    What sort of custom messages do you want to see in the plugin?

    Also, thank you.
    Thanks?

    Hope you find it useful.
     
  5. Offline

    spunkiie

    @NuclearW

    Thank you for your quick reply :D

    Well, I want to change default messages like:

    "Last seen on"
    "First seen on"
    "No record"

    So I can make your plugin speak my users native language :)

    TIA
     
  6. Offline

    NuclearW

    Ah, multi-language support, of course, I will get to work.
     
  7. Offline

    spunkiie

    Also, I'm on Linux using my language locale: (PT-BR) but the time is still showing in english :\
     
  8. Offline

    NuclearW

    I believe this is controlled by the Java implementation of date formatting, and is out of my control. I will ask and see if there is something I can do, but I believe you need to also set your Java locale?
     
  9. Offline

    spunkiie

    Yeap, Tried to set the locale with -Duser.language= without success :(
     
  10. Offline

    NuclearW

    Updated to v0.2, now supports translation via a lang file, it should also attempt to use the default locale set by the JVM for the date.

    Please let me know how it works.
     
  11. Offline

    spunkiie

    Cool, will test now

    Works like a charm :D

    TY, I'm running on my server right now

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

    NuclearW

    @spunkiie

    Glad to hear it works, if you could PM me your translated lang file so I can share it with others I would very much appreciate it.

    Updated to Version 0.3, now with less 1AM typo's, and support for PermissionEx.

    Confirmed to work in 928

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

    spunkiie

    REQ: Please add support for case INSENSITIVE queries.
     
  14. Offline

    NuclearW

    Confirmed working in 935.


    I will do so in the next version as soon as i get home, this will take some time, however, so please understand until next week.
     
  15. Offline

    NuclearW

    Confirmed working in 953.

    @spunkiie, Version 0.4 now supports case-insensitive player searching for Unix-based servers.
     
  16. Offline

    dbizzzle

    Hello, I would like to see if it posted your lastseen time on login?
     
  17. Offline

    NuclearW

    If you mean does the plugin set your lastseen time when you first log in, the answer is no.

    It only sets the lastseen time when a player leaves the server.

    Does this answer your question?
     
  18. Offline

    dbizzzle

    No what I mean is could you make it so when you log onto the server "You were last seen on mm/dd/yyyy" comes up in the chat
     
  19. Offline

    NuclearW

    Ah, I understand now. I'll consider this for the next version.
     
  20. Offline

    dbizzzle

    Yeah or make it so you can add it to another plugin that already states stuff on joining such as autoannouncer, this way it would not interfere and you could colour it and make it say anything you want other than "You were last seen on"
     
  21. Offline

    NuclearW

    You can change anything this plugin says using the language file, this message would be no different.

    I am not sure what you mean by interfering with another plugin, however, as all plugins get a chance to respond to a player logging in.
     
  22. Offline

    dbizzzle

    Oh, I see but it would be nice to have the message have customizable colour to match with other messages at login, Thanks!
     
  23. Offline

    Techykid3

    This looks like an awesome plugin! Trying it today!

    Edit: After trying it: Perfect! All you need now is the custom first join messages.


    Like: It would check the world's players folder to see if a player has joined before, and if so, it disables the message for them, if they are brand new, never seen before, then it will say Welcome {PLAYERNAME} to the server!, but if it was customizable too, it would be AWESOME!
     
  24. Offline

    MrConfig

    I use it mostly for /firstseen to know the first time a user connected and it's working great. Thanks!
     
  25. Offline

    NuclearW

    And so it is, in v0.6
     
  26. Offline

    Leon167

    Nice Plugin.
    But how can i color the "Welcome {PLAYERNAME} to the server!" ?
     
  27. Offline

    NuclearW

    I'll see about adding this in the next version.

    Version 0.7: Supports Bukkit Permissions and Permission 2/3
     
  28. Offline

    NuclearW

    FirstLastSeen has been translated into Spanish and Polish, many thanks to kevdama and @TGF respectively.
     
  29. Offline

    Kainzo

    Is there any reason why it doesnt read the data directly from the Map/players folder? It would seem to be an easier method and virtually no storage necessary on the plugin portion vs creating your own database.
     
  30. Offline

    NuclearW

    The server I work for changes maps every few months or so, so having a storage method that remains persistent across those maps is a must.

    Also why this imports from Towny, we were moving from Towny originally filled the map-independent storage method at the time this was made.

    Hope this answers your question.
     

Share This Page