[INACTIVE][INFO] LastSeen v1.2 [602]

Discussion in 'Inactive/Unsupported Plugins' started by Hafnium, Mar 2, 2011.

  1. Offline

    Hafnium

    This plugin is not and never will again be supported.
    This is a good alternative.

    Last Seen
    Version: v1.2

    Last Seen allows players to check the time another player last logged off the server. It requires no configuration, so just drop it in your plugins folder and run.
    Features:
    • See when a user last logged off with /lastseen <username>
    Download 1.2
    Download 1.1 [556]

    Source Code (Coming Soon)

    Changelog:

    Version 1.2
    • Updated for 602.
    • Now reports players that are online as online, instead of giving their last log off time.
    Version 1.1
    • Fixed major bug.
    • Now reports days if appropriate.
    Version 1.0
    • First Release.
    • /lastseen <username>
     
    Ben91, XDTobi and harakiwi like this.
  2. Offline

    pixelbat

    Yay! you rock! very nice. Thank you so much.
     
  3. Offline

    Coelho

    I like it, however i'd like it better if it had more than the bare meaning of the plugin.
     
  4. Offline

    pixelbat

    I must be doing it wrong. Dropped it in the plugin directory. Whenever anyone uses /lastseen it does nothing :| Console also says "Unknown console command". I'm using CB 440.
     
  5. Offline

    Hafnium

    They changed the way all player commands work between 440 and the newest CraftBukkit. You'll have to update to make this work.
     
  6. Offline

    godsyn

    @Hafnium
    In what format is the lastseen data stored? I'd like to parse it from a bash script.
    Thanks for the awesome plugin.
     
  7. Offline

    Hafnium

    The data is stored in /plugins/LastSeen/times.yml, but the actual number I store is how many milliseconds after the start of 1970 did they log out. That's how Java keeps track of time.
     
  8. Offline

    ZachBora

    I dont suppose reading from the log files would be very efficient. Good idea, I might try the plugin tonight.
     
  9. Offline

    Hoddie54

    Code:
    011-03-19 07:24:10 [SEVERE] Exception in thread "Thread-976"
    2011-03-19 07:24:10 [SEVERE] java.lang.NullPointerException
    2011-03-19 07:24:10 [SEVERE] at net.eonz.bukkitplugin.lastseen.LastSeen.onEnable(LastSeen.java:19)
    2011-03-19 07:24:10 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    2011-03-19 07:24:10 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:451)
    2011-03-19 07:24:10 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
    2011-03-19 07:24:10 [SEVERE] at com.earth2me.essentials.commands.Commandplugin$1.run(Commandplugin.java:116)
    2011-03-19 07:24:10 [SEVERE] at java.lang.Thread.run(Thread.java:636)
    Build 556 Reccomened. I think the plugin needs to be updated
     
  10. Offline

    Hafnium

    Huh? I'm running it on 556 with no problem. here is NOTHING in LastSeen.java that should be throwing null pointers. Looks like a bukkit error.

    Code:
    package net.eonz.bukkitplugin.lastseen;
    
    import org.bukkit.event.Event;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class LastSeen extends JavaPlugin {
    
        public final LSPlayerListener pl = new LSPlayerListener(this);
    
        public void onDisable() {
    
            System.out.println("LastSeen: Disabled");
    
        }
    
        public void onEnable() {
    
            getCommand("lastseen").setExecutor(pl);
            this.getServer()
                    .getPluginManager()
                    .registerEvent(Event.Type.PLAYER_QUIT, pl,
                            Event.Priority.Monitor, this);
            System.out.println("LastSeen: Enabled");
    
        }
    
    }
    At least nothing that should be throwing null pointers for you but not me.
     
  11. Offline

    Dawodo

    Hm could you maybe add a function to list the last x persons who were online?
    Like /lastseen
    "The last 3 Persons online were: A (currently logged in), B (last seen 3 Minutes ago), C (last seen 1 day ago)"
     
  12. Offline

    ZachBora

    I am wondering if the lastseen command could also display something like :
    last seen blah blah and is currently online.

    I tried it on someone and it showed he was online 53 minutes ago but he was actually still in-game.
     
  13. Offline

    Hafnium

    Yeah, I forgot about that. :p
     
  14. Offline

    ZachBora

    You got some references to "essentials" plugin in there. Might be related.
     
  15. Offline

    Hafnium

    Aha, then its either something wrong with essentials, or our plugins are simply not compatible. I'll see if I can reproduce the error again.
     
  16. Offline

    ZachBora

    I also have Essentials on my server but it could be a different version.
     
  17. Offline

    ThomasJ

    Just a heads up. No longer working on latest RB.
    Code:
    2011-03-30 23:16:35 [SEVERE] Could not load plugins/LastSeen.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:102)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:158)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:106)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:62)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:98)
            ... 8 more
    Caused by: java.lang.VerifyError: class net.eonz.bukkitplugin.lastseen.LSPlayerListener overrides final method onPlayerQuit.(Lorg/bukkit/event/player/PlayerEvent;)V
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at net.eonz.bukkitplugin.lastseen.LastSeen.<init>(LastSeen.java:8)
            ... 13 more
    
     
  18. Offline

    Hafnium

    What, did they change the constructor or something? :p I may not have time to update until this weekend.
     
  19. Offline

    ThomasJ

  20. Offline

    Hafnium

    Yeah Thomas, thanks, but it was just a changed event name. I had to add five more letters to my code. :p
    Update inbound.
     
  21. Offline

    Dawodo

    Thanks for the update! By the way, when are you going to upload the source? :)
     
  22. Offline

    Hafnium

    Actually, the source is available in the jar file. Open the jar with WinRar or 7Zip and check out the "net" folder.
     
  23. Offline

    godsyn

    Link to jar? Above URL is down.
     
  24. Offline

    BigRedWood

    10:52:25 [SEVERE] Nag author: '<NoAuthorGiven>' of 'LastSeen' about the following: onPlayerQuit has been replaced with a new signature, (PlayerQuitEvent)

    Just letting you know.
     
  25. Offline

    Frizkie

    Excellent plugin, can't wait for an update for the new PlayerQuitEvent.
     
  26. Offline

    TOAST7312

    Just thought I'd make a note here that I am getting this error indicating that LastSeen is not working, at least for me, with 617, the current recommended build.

    You've prolly see this a million times already but I figured if my contribution even helped a bit it was worth it to say this here. :p

    Code:
    00:05:12 [SEVERE] Could not load plugins\LastSeen.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:65)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:158)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:106)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:63)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.util.zip.ZipException: error in opening zip file
            at java.util.zip.ZipFile.open(Native Method)
            at java.util.zip.ZipFile.<init>(Unknown Source)
            at java.util.jar.JarFile.<init>(Unknown Source)
            at java.util.jar.JarFile.<init>(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:52)
            ... 8 more>
     
  27. One question. Is it possible to add a "/lastseen all" command that could list all players on the server and when last they where logged in?
     
  28. Offline

    ZachBora

    Lol... I've got an over 100 player current base, maybe make a command to display the last 10 players.
     
  29. Well, a "last 10 online" world work too. Or allowing the serveradmin to setup how many players "list all" should show? :)
     
  30. Offline

    Techcuron

    Link broken
     

Share This Page