[INFO/MISC]OnlineTime v1.1.0 - Player Monitoring Plugin [1000]

Discussion in 'Inactive/Unsupported Plugins' started by Kajiakuma, Jul 23, 2011.

  1. Offline

    Kajiakuma

    OnlineTime - Player Monitoring
    Version: 1.1.0
    CraftBukkit: 1000
    Download: <Edit by Moderator: Redacted mediafire url>
    All Versions: <Edit by Moderator: Redacted mediafire url>

    ==========
    Description:
    ==========
    OnlineTime is a player monitoring plugin wich gives you information about every player logged in after aktivating this plugin. It shows you things like login time or ingame playtime. Next update will include a new command wich send a list of all logged players.

    ==========
    Notice:
    ==========
    This is my first plugin. If you find any bugs or errors please let me know. If you have any ideas about new features let me also know. Please change the Mysql settings if you want to use Mysql. You have to set mysql to true by command, or config.yml will be used for storage instead.

    Upgrade from 1.0.2: You have to change your timestamps stored in config.yml like this:
    from: 2011-07-27T21:17:11.595z
    to: '2011-07-27 21:17:11.595'
    Entries wich begin like '&001' create ingame errors. Delete those '&001'.

    Upgrade from lower than 1.0.2: Please delete config.yml, Mysql Tables "Online" and "Playtime".

    <font color="rgb(255, 0, 0)">Mysql is NOT required to run this Plugin!</font>


    Features:
    * Shows First Login Timestamp
    * Shows last Login Timestamp
    * Mysql Support
    * Shows complete playtime
    * Shows playtime for last session

    ToDo:
    * Output player with most playtime ever #priority: low
    * Output list of all logged players #status: test phase
    * Add PermissionsBukkit Support #priority: high
    * feature to search for certain amount of time #priority: medium

    Commands:

    Changelog:
    Version 1.1.0:
    * added playtime logging
    * removed config storage issue

    Version 1.0.2:
    * changed time storage and output format


    Version 1.0.1:
    * Added Mysql Support
    * removes some Filestorage Bugs

    Version 1.0:

    * initial release

    Known Bugs:

    * Minecraft returns the command "/onlinetime" after executing a command successfully
     
    Last edited by a moderator: Nov 13, 2016
    AS1LV3RN1NJA likes this.
  2. Offline

    AJCStriker

    Perfect been looking for something like this, is it possible you could add a feature to see who was online at a certain time within a set amount of time i.e

    How long has MrNoob played in the last week?
     
  3. Offline

    Kajiakuma

    Actually I use a yaml file for simple data storage. It would be very hard to implement this feature and store data in the yaml file. But if I change to Mysql storage, it would be very easy.
    Add Mysql Support to the todo list.
     
  4. Offline

    feildmaster Retired Staff

    Not entirely true. Store "times" under the player and log what times they've been on. It might require a bit more work than you are used to, but it gets rid of mysql dependency.
     
  5. Offline

    Kajiakuma

    Ah I don't think at a logfile. I have to think about it how to handle this later on, it's time to sleep in my country ;)

    Released Version 1.0.1 - now working on playtime calculation.

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

    superjack010

    Uhm, What exactly does the time show in... Because I just installed the plugin and did /onlinetime player [Playername] and it said he was online for..1311693582950 o.-
     
  7. Offline

    Kajiakuma

    Oh no...maybe I uploadet the development version at last update. At Version 1.1.0 I changed time format to Timestamp (these numbers) wich is more precise and can be converted to the format YYYY.MM.DD hh:mm:ss or something like that.
    Sorry, but this was my fault.:mad: I'll hurry to release next version to fix this. ;)

    Alright, Version 1.0.2 online - only small changes. Everyone who upgrade from a lower Version:
    Please DELETE config.yml and, if you use mysql, also the tables "Online" and "Playtime".

    Edit: 45min for fixing this bug, yeah!^^


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

    tiga05

    Hey guys,

    I´m new to Mysql Databases and got the following problem: I got a databaseuser and a database. In your config I must add the db-name. My Databasename for the database user is: Tiga05_db_01 . At the end it looks like:
    dburl: jdbc:mysql://localhost:3306/Tiga05_db_01 . After starting the Minecraftserver the server shows many errors:
    Code:
    12:23:09 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Tab
    le 'Tiga05_db_01.Online' doesn't exist
    12:23:09 [SEVERE]       at sun.reflect.NativeConstructorAccessorImpl.newInstance
    0(Native Method)
    12:23:09 [SEVERE]       at sun.reflect.NativeConstructorAccessorImpl.newInstance
    (Unknown Source)
    12:23:09 [SEVERE]       at sun.reflect.DelegatingConstructorAccessorImpl.newInst
    ance(Unknown Source)
    12:23:09 [SEVERE]       at java.lang.reflect.Constructor.newInstance(Unknown Sou
    rce)
    12:23:09 [SEVERE]       at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    12:23:09 [SEVERE]       at com.mysql.jdbc.Util.getInstance(Util.java:382)
    12:23:09 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.j
    ava:1052)
    12:23:09 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
    3593)
    12:23:09 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
    3525)
    12:23:09 [SEVERE]       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    
    12:23:09 [SEVERE]       at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:21
    40)
    12:23:09 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.
    java:2620)
    12:23:09 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.
    java:2570)
    12:23:09 [SEVERE]       at com.mysql.jdbc.StatementImpl.executeQuery(StatementIm
    pl.java:1474)
    12:23:09 [SEVERE]       at de.Kajiakuma.OnlineTime.Database.query(Database.java:
    33)
    12:23:09 [SEVERE]       at de.Kajiakuma.OnlineTime.Database.setupMysql(Database.
    java:43)
    12:23:09 [SEVERE]       at de.Kajiakuma.OnlineTime.OnlineTime.onEnable(OnlineTim
    e.java:32)
    12:23:09 [SEVERE]       at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:126)
    12:23:09 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:878)
    12:23:09 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:272)
    12:23:09 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:162)
    12:23:09 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.enablePlugins(Craf
    tServer.java:146)
    12:23:09 [SEVERE]       at net.minecraft.server.MinecraftServer.e(MinecraftServe
    r.java:284)
    12:23:09 [SEVERE]       at net.minecraft.server.MinecraftServer.a(MinecraftServe
    r.java:271)
    12:23:09 [SEVERE]       at net.minecraft.server.MinecraftServer.init(MinecraftSe
    rver.java:148)
    12:23:09 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:335)
    12:23:09 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:422)
    12:23:09 [INFO] [OnlineTime]: Mysql set to false...use files for storage
    12:23:09 [SEVERE] java.io.IOException: Couldn't get lock for OnlineTime/logfile.
    log
    12:23:09 [SEVERE]       at java.util.logging.FileHandler.openFiles(Unknown Sourc
    e)
    12:23:09 [SEVERE]       at java.util.logging.FileHandler.<init>(Unknown Source)
    12:23:09 [SEVERE]       at de.Kajiakuma.OnlineTime.Logfile.Log(Logfile.java:15)
    12:23:09 [SEVERE]       at de.Kajiakuma.OnlineTime.OnlineTime.onEnable(OnlineTim
    e.java:53)
    12:23:09 [SEVERE]       at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:126)
    12:23:09 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:878)
    12:23:09 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:272)
    12:23:09 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:162)
    12:23:09 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.enablePlugins(Craf
    tServer.java:146)
    12:23:09 [SEVERE]       at net.minecraft.server.MinecraftServer.e(MinecraftServe
    r.java:284)
    12:23:09 [SEVERE]       at net.minecraft.server.MinecraftServer.a(MinecraftServe
    r.java:271)
    12:23:09 [SEVERE]       at net.minecraft.server.MinecraftServer.init(MinecraftSe
    rver.java:148)
    12:23:09 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:335)
    12:23:09 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:422)
    12:23:09 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Tab
    le 'Tiga05_db_01.Online' doesn't exist
    12:23:09 [SEVERE]       at sun.reflect.NativeConstructorAccessorImpl.newInstance
    0(Native Method)
    12:23:09 [SEVERE]       at sun.reflect.NativeConstructorAccessorImpl.newInstance
    (Unknown Source)
    12:23:09 [SEVERE]       at sun.reflect.DelegatingConstructorAccessorImpl.newInst
    ance(Unknown Source)
    12:23:09 [SEVERE]       at java.lang.reflect.Constructor.newInstance(Unknown Sou
    rce)
    12:23:09 [SEVERE]       at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    12:23:09 [SEVERE]       at com.mysql.jdbc.Util.getInstance(Util.java:382)
    12:23:09 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.j
    ava:1052)
    12:23:09 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
    3593)
    12:23:09 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
    3525)
    12:23:09 [SEVERE]       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    
    12:23:09 [SEVERE]       at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:21
    40)
    12:23:09 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.
    java:2620)
    12:23:09 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.
    java:2570)
    12:23:09 [SEVERE]       at com.mysql.jdbc.StatementImpl.executeQuery(StatementIm
    pl.java:1474)
    12:23:09 [SEVERE]       at de.Kajiakuma.OnlineTime.Database.query(Database.java:
    33)
    12:23:09 [SEVERE]       at de.Kajiakuma.OnlineTime.Database.setupMysql(Database.
    java:43)
    12:23:09 [SEVERE]       at de.Kajiakuma.OnlineTime.OnlineTime.onEnable(OnlineTim
    e.java:63)
    12:23:09 [SEVERE]       at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:126)
    12:23:09 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:878)
    12:23:09 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:272)
    12:23:09 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:162)
    12:23:09 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.enablePlugins(Craf
    tServer.java:146)
    12:23:09 [SEVERE]       at net.minecraft.server.MinecraftServer.e(MinecraftServe
    r.java:284)
    12:23:09 [SEVERE]       at net.minecraft.server.MinecraftServer.a(MinecraftServe
    r.java:271)
    12:23:09 [SEVERE]       at net.minecraft.server.MinecraftServer.init(MinecraftSe
    rver.java:148)
    12:23:09 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:335)
    12:23:09 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:422)
    
     
    He bleats, that the table (you never said, that i must create a table) does not exist. But i have no idea how to create a table, because there a so much settings...

    EDIT: btw: We use bukkit build 1000
     
  9. Offline

    Kajiakuma

    At first one thing to clear: these plugin checks if required tables exist or not. If not and plugin runs in mysql mode: It creates the required tables itself. If normal mode: No tables will be created.

    Second: Are you sure, that "Tiga05_db_01.Online" is the correct table name? It looks like you write wrong table name. If you want to use OnlineTime in mysql mode, you have to set mysql to true with ingame command:
    "/onlinetime setmysql true". This is set to false by default.

    If you are not sure about Mysql and Databases in General, you could switch to normal mode.

    About Version 1.1.0:
    Update will be released this week, but not sure when exactly.
     
  10. Offline

    Kajiakuma

    Update: Version 1.1.0 released.
    Now working on possibility to output list of all stored players
     
  11. Offline

    dbwiesel

    Hello,

    like the idea of your plugin. But i could not get i to work right i think.

    I have a Windows-Server and MC 1.7.3 and Bukkit 1000 running. And on first start with the onlinetime Plugin the "plugins/OnlineTime " Folder was created and a config.yml was made.

    The config.yml looks like this (looks for me like the default config):
    Code:
    Mysql:
        enable: 'false'
        dbpass: ' '
        dbuser: root
        dburl: jdbc:mysql://localhost:3306/YourDB
    
    But when i stop and start the server i get the following errors:

    Code:
    21:45:19 [SCHWERWIEGEND] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    
    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the
     server.
    21:45:19 [SCHWERWIEGEND]        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    21:45:19 [SCHWERWIEGEND]        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at java.lang.reflect.Constructor.newInstance(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    21:45:19 [SCHWERWIEGEND]        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    21:45:19 [SCHWERWIEGEND]        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at java.lang.reflect.Constructor.newInstance(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    21:45:19 [SCHWERWIEGEND]        at java.sql.DriverManager.getConnection(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at java.sql.DriverManager.getConnection(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at de.Kajiakuma.OnlineTime.Database.openConnection(Database.java:27)
    21:45:19 [SCHWERWIEGEND]        at de.Kajiakuma.OnlineTime.Database.setupMysql(Database.java:69)
    21:45:19 [SCHWERWIEGEND]        at de.Kajiakuma.OnlineTime.OnlineTime.onEnable(OnlineTime.java:32)
    21:45:19 [SCHWERWIEGEND]        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    21:45:19 [SCHWERWIEGEND]        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
    21:45:19 [SCHWERWIEGEND]        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:272)
    21:45:19 [SCHWERWIEGEND]        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
    21:45:19 [SCHWERWIEGEND]        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
    21:45:19 [SCHWERWIEGEND]        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    21:45:19 [SCHWERWIEGEND]        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    21:45:19 [SCHWERWIEGEND]        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    21:45:19 [SCHWERWIEGEND]        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    21:45:19 [SCHWERWIEGEND]        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    21:45:19 [SCHWERWIEGEND] Caused by: java.net.ConnectException: Connection refused: connect
    21:45:19 [SCHWERWIEGEND]        at java.net.PlainSocketImpl.socketConnect(Native Method)
    21:45:19 [SCHWERWIEGEND]        at java.net.PlainSocketImpl.doConnect(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at java.net.PlainSocketImpl.connect(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at java.net.SocksSocketImpl.connect(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at java.net.Socket.connect(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at java.net.Socket.connect(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at java.net.Socket.<init>(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at java.net.Socket.<init>(Unknown Source)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254)
    21:45:19 [SCHWERWIEGEND]        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)
    21:45:19 [SCHWERWIEGEND]        ... 27 more
    21:45:19 [INFO] [OnlineTime]: Mysql set to false...use files for storage
    21:45:21 [SCHWERWIEGEND] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    
    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the
     server.
    21:45:21 [SCHWERWIEGEND]        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    21:45:21 [SCHWERWIEGEND]        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at java.lang.reflect.Constructor.newInstance(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    21:45:21 [SCHWERWIEGEND]        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    21:45:21 [SCHWERWIEGEND]        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at java.lang.reflect.Constructor.newInstance(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    21:45:21 [SCHWERWIEGEND]        at java.sql.DriverManager.getConnection(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at java.sql.DriverManager.getConnection(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at de.Kajiakuma.OnlineTime.Database.openConnection(Database.java:27)
    21:45:21 [SCHWERWIEGEND]        at de.Kajiakuma.OnlineTime.Database.setupMysql(Database.java:69)
    21:45:21 [SCHWERWIEGEND]        at de.Kajiakuma.OnlineTime.OnlineTime.onEnable(OnlineTime.java:52)
    21:45:21 [SCHWERWIEGEND]        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    21:45:21 [SCHWERWIEGEND]        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
    21:45:21 [SCHWERWIEGEND]        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:272)
    21:45:21 [SCHWERWIEGEND]        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
    21:45:21 [SCHWERWIEGEND]        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
    21:45:21 [SCHWERWIEGEND]        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    21:45:21 [SCHWERWIEGEND]        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    21:45:21 [SCHWERWIEGEND]        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    21:45:21 [SCHWERWIEGEND]        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    21:45:21 [SCHWERWIEGEND]        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    21:45:21 [SCHWERWIEGEND] Caused by: java.net.ConnectException: Connection refused: connect
    21:45:21 [SCHWERWIEGEND]        at java.net.PlainSocketImpl.socketConnect(Native Method)
    21:45:21 [SCHWERWIEGEND]        at java.net.PlainSocketImpl.doConnect(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at java.net.PlainSocketImpl.connect(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at java.net.SocksSocketImpl.connect(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at java.net.Socket.connect(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at java.net.Socket.connect(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at java.net.Socket.<init>(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at java.net.Socket.<init>(Unknown Source)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254)
    21:45:21 [SCHWERWIEGEND]        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)
    21:45:21 [SCHWERWIEGEND]        ... 27 more
    21:45:21 [INFO] [OnlineTime]: Version 1.1.0 is enabled!

    Now my thought is: It maybe tries to open mysql, but it is disabled in the config. Why could this happen ?

    And one another point: Where is the data stored for online/offline times of the users, if you have disabled mysql ? I couldn't find any file where this things could be stored. Maybe it was not created at first start ?

    So, i hope you can please help. And i will be glad if i can get this nice plugin running :) (And maybe could help to find a problem :) )

    Thanks !
     
  12. Offline

    Kajiakuma

    At first, if mysql is disabled, the data will be stored in config.yml. If a player log in for first time, a new path with the players name will be created. If it is not first login the existing path will be updated.

    This may not happen. Seems to be my fault, not yours. Maybe I have forget something in the code. I check this immediately. However, I will inform you again soon. Maybe it takes some time, because its 11:52pm in Germany.

    Edit1: It is irritating that nobody else get this error. I have forgot to check if(ismysqlEnabled()) bevore run setupMysql(). This triggered the error, sorry for that. ;)

    Edit2: You also can ask in German, if this would be easier for you. Ihr könnt auch auf deutsch fragen, wenn das einfacher sein sollte.
     
  13. Offline

    PotatoJam

    Hello!

    Is it possible for you to make the time into 12 hour time.
     
    Last edited by a moderator: Nov 13, 2016
  14. Offline

    Kajiakuma

    Yes, this is possible. I can add a feature to aktivate or deactivate 12hour time format. It will take some time to add this feature.
     
  15. Offline

    flevas

    very very nice i will install it
     
  16. Offline

    dbwiesel

    Hi Kajiakuma,

    thx for the info. I thought of something like this :) Glad you found the "bug" :)

    I now checked the config.yml

    and there are lines like:

    Code:
    dbwiesel:
        lastlogin: '2011-08-04 22:31:55.208'
    So this is ok.



    But one additional thing now occured:


    Code:
    20:32:31 [INFO] dbwiesel lost connection: disconnect.quitting
    20:32:31 [INFO] Connection reset
    20:32:31 [SCHWERWIEGEND] Could not pass event PLAYER_QUIT to OnlineTime
    java.lang.NumberFormatException: For input string: "null"
            at java.lang.NumberFormatException.forInputString(Unknown Source)
            at java.lang.Long.parseLong(Unknown Source)
            at java.lang.Long.parseLong(Unknown Source)
            at de.Kajiakuma.OnlineTime.OnlineTimePlayerListener.onPlayerQuit(OnlineTimePlayerListener.java:144)
            at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:251)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
            at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:146)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:608)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:231)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)

    So, this happens when a player disconnects from the server.

    Maybe this could be the source for my additional problem: I can't see any onlinetime of the players. Maybe there is a problem storing the information when not using mysql ? Or just catching the logout event and making the onlinetime entry in config.yml ?

    So thx again for the info. Happy if i can help finding bugs :) (In my Job i do software-tests also, so im a bit of "routined" in finding things, other people dont find :) )

    BTW: Deutsch wäre natürlich möglich, aber wir wollen ja International bleiben - Könnte ja andere auch interessieren. Thx auf jeden Fall nochmal für das Plugin und die freiwillige (von vielen leider meistens nicht anerkannte) Hilfe.

    lg
     
  17. Offline

    Kajiakuma

    This bug will be corrected with version 1.1.1. I'm trying to finish and add the command "/onlinetime list" to the next update. Because of that it takes some hours (hope only hours) more time until release.
     
  18. Offline

    shadydeath999

    @Kajiakuma : error:
    2011-08-07 04:52:55 [INFO] Blazagoath lost connection: disconnect.endOfStream
    2011-08-07 04:52:55 [SEVERE] Could not pass event PLAYER_QUIT to OnlineTime
    java.lang.NumberFormatException: For input string: "null"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Long.parseLong(Long.java:410)
    at java.lang.Long.parseLong(Long.java:468)
    at de.Kajiakuma.OnlineTime.OnlineTimePlayerListener.onPlayerQuit(OnlineTimePlayerListener.java:144)
    at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:251)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:146)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:608)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:231)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  19. Offline

    dbwiesel

    @shadydeath999: I posted exactly this error 2 posts ago :)

    And Kajiakuma answered, it will be fixed in the next version :) So we just have to wait :D
     
  20. Offline

    Xanadar

    \o/

    I would send you food and drinks if I could. Cheers.
     
  21. Offline

    Kajiakuma

    Status update: I have some errors I cannot get rid of. I hope it takes not too long. Aktually I don't know when next version will be finished.
     
  22. Offline

    TfT_02

    Small typo here: " after aktivating this" just wanted to point that out. :) Great plugin btw.
     
  23. Offline

    Xanadar

    I was wondering, thank you so much for the update! Good luck!
     
  24. Offline

    California292

    I've got two errors.

    One when I start the server:
    Code:
    2011-08-14 14:02:52 [INFO] [OnlineTime]: Mysql set to false...use files for storage
    2011-08-14 14:02:53 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    
    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    2011-08-14 14:02:53 [SEVERE] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-08-14 14:02:53 [SEVERE] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    2011-08-14 14:02:53 [SEVERE] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-08-14 14:02:53 [SEVERE] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    2011-08-14 14:02:53 [SEVERE] 	at java.sql.DriverManager.getConnection(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at java.sql.DriverManager.getConnection(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at de.Kajiakuma.OnlineTime.Database.openConnection(Database.java:27)
    2011-08-14 14:02:53 [SEVERE] 	at de.Kajiakuma.OnlineTime.Database.setupMysql(Database.java:69)
    2011-08-14 14:02:53 [SEVERE] 	at de.Kajiakuma.OnlineTime.OnlineTime.onEnable(OnlineTime.java:53)
    2011-08-14 14:02:53 [SEVERE] 	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    2011-08-14 14:02:53 [SEVERE] 	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
    2011-08-14 14:02:53 [SEVERE] 	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:272)
    2011-08-14 14:02:53 [SEVERE] 	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
    2011-08-14 14:02:53 [SEVERE] 	at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
    2011-08-14 14:02:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    2011-08-14 14:02:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    2011-08-14 14:02:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    2011-08-14 14:02:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    2011-08-14 14:02:53 [SEVERE] 	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-08-14 14:02:53 [SEVERE] Caused by: java.net.ConnectException: Connection refused: connect
    2011-08-14 14:02:53 [SEVERE] 	at java.net.PlainSocketImpl.socketConnect(Native Method)
    2011-08-14 14:02:53 [SEVERE] 	at java.net.PlainSocketImpl.doConnect(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at java.net.PlainSocketImpl.connect(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at java.net.SocksSocketImpl.connect(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at java.net.Socket.connect(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at java.net.Socket.connect(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at java.net.Socket.<init>(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at java.net.Socket.<init>(Unknown Source)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254)
    2011-08-14 14:02:53 [SEVERE] 	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)
    2011-08-14 14:02:53 [SEVERE] 	... 27 more
    And one when a player quits(but this has been reported already by other people):
    Code:
    2011-08-14 14:05:35 [SEVERE] Could not pass event PLAYER_QUIT to OnlineTime
    java.lang.NumberFormatException: For input string: "null"
    	at java.lang.NumberFormatException.forInputString(Unknown Source)
    	at java.lang.Long.parseLong(Unknown Source)
    	at java.lang.Long.parseLong(Unknown Source)
    	at de.Kajiakuma.OnlineTime.OnlineTimePlayerListener.onPlayerQuit(OnlineTimePlayerListener.java:144)
    	at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:251)
    	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    	at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:146)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:608)
    	at net.minecraft.server.NetworkManager.b(NetworkManager.java:231)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    So far, nothing else. I'm using v1.1.0 with RB 1000. Also, I use AuthMe for offline mode logins, and OnlineTime still counts the person as "online" even if they didn't log into AuthMe. Maybe add "offline-login-plugin" detectability?
     
  25. Offline

    Xanadar

    Please read the posts prior to your own.
     
  26. Offline

    AS1LV3RN1NJA

    Are the errors still there?
     
  27. Offline

    Xanadar

    Probably not since
    and this current download is for 1.1.0
     
  28. Offline

    California292

    Um..... facepalm much?
    Yeah, both errors still happen with RB 1060. Hopefully a fix soon. Even though it doesn't seem to mess up any part of the plugin, it's still kind of annoying seeing an error every time I restart my server.
     
  29. Offline

    chausser

    hey, I really like what you have going here and I would love to help out maybe improve the config a bit. Is this hosted on Github where i could fork it? Or maybe you want to send me the source and I can send you my changes. If you dont want to share the source I also understand. Let me know.
     
  30. Offline

    Thasan

    Removed, because its so buggy =(

    This was last error
    Code:
    08:06:32 [SEVERE] java.sql.SQLException: Illegal operation on empty result set.
    
    08:06:32 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
    08:06:32 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
    08:06:32 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
    08:06:32 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
    08:06:32 [SEVERE]       at com.mysql.jdbc.ResultSetImpl.checkRowPos(ResultSetImpl.java:841)
    08:06:32 [SEVERE]       at com.mysql.jdbc.ResultSetImpl.getStringInternal(ResultSetImpl.java:5656)
    08:06:32 [SEVERE]       at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5576)
    08:06:32 [SEVERE]       at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5616)
    08:06:32 [SEVERE]       at de.Kajiakuma.OnlineTime.OnlineTimePlayerListener.onPlayerQuit(OnlineTimePlayerListener.java:126)
    08:06:32 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:251)
    08:06:32 [SEVERE]       at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    08:06:32 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    08:06:32 [SEVERE]       at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:146)
    08:06:32 [SEVERE]       at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:628)
    08:06:32 [SEVERE]       at net.minecraft.server.NetworkManager.b(NetworkManager.java:231)
    08:06:32 [SEVERE]       at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
    08:06:32 [SEVERE]       at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    08:06:32 [SEVERE]       at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
    08:06:32 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    08:06:32 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    08:06:32 [SEVERE] java.sql.SQLException: Illegal operation on empty result set.
    08:06:32 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
    08:06:32 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
    08:06:32 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
    08:06:32 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
    08:06:32 [SEVERE]       at com.mysql.jdbc.ResultSetImpl.checkRowPos(ResultSetImpl.java:841)
    08:06:32 [SEVERE]       at com.mysql.jdbc.ResultSetImpl.getStringInternal(ResultSetImpl.java:5656)
    08:06:32 [SEVERE]       at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5576)
    08:06:32 [SEVERE]       at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5616)
    08:06:32 [SEVERE]       at de.Kajiakuma.OnlineTime.OnlineTime.setPlayer(OnlineTime.java:152)
    08:06:32 [SEVERE]       at de.Kajiakuma.OnlineTime.OnlineTimePlayerListener.onPlayerQuit(OnlineTimePlayerListener.java:155)
    08:06:32 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:251)
    08:06:32 [SEVERE]       at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    08:06:32 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    08:06:32 [SEVERE]       at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:146)
    08:06:32 [SEVERE]       at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:628)
    08:06:32 [SEVERE]       at net.minecraft.server.NetworkManager.b(NetworkManager.java:231)
    08:06:32 [SEVERE]       at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
    08:06:32 [SEVERE]       at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    08:06:32 [SEVERE]       at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
    08:06:32 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    08:06:32 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     

Share This Page