Spigot BookStats 1.8

Stats in a book with flat file and MySQL support!

  1. zeshan321 submitted a new resource:

    BookStats - Stats in a book with flat file and MySQL support!

    Read more about this resource...
     
    #1 ZeeZee, Feb 22, 2015
    Last edited: Feb 23, 2015
  2. Thanks!
     
  3. Looks like a really cool plugin and I would love to use it. Just wanted to know if there is UUID support with it, I didn't see it in the information of it. If there isn't, please add it. As of right now, UUIDs are important for plugins like these.
     
  4. It does have UUID support. :)
     
  5. zeshan321 updated BookStats with a new update entry:

    Give Limit

    Read the rest of this update entry...
     
  6. Can you add prefix of table support for multi-servers which use the same database?
     
  7. I'll add a option to change the table name. :p
     
    #8 ZeeZee, Feb 23, 2015
    Last edited: Feb 23, 2015
  8. zeshan321 updated BookStats with a new update entry:

    BookStats

    Read the rest of this update entry...
     
  9. Done! :)
     
  10. Thx!:D
     
  11. Some error occured, the timeline is reversed below:
    Code (Text):
    23.02 14:56:07 [Server] INFO ... 3 more
    23.02 14:56:07 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    23.02 14:56:07 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftTask.run(CraftTask.java:58)
    23.02 14:56:07 [Server] INFO at me.Zeshan.BookStats.Main$1$1.run(Main.java:146)
    23.02 14:56:07 [Server] INFO Caused by: java.lang.NoSuchMethodError: org.bukkit.Bukkit.getOnlinePlayers()Ljava/util/Collection;
    23.02 14:56:07 [Server] INFO at java.lang.Thread.run(Thread.java:745)
    23.02 14:56:07 [Server] INFO at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    23.02 14:56:07 [Server] INFO at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    23.02 14:56:07 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
    23.02 14:56:07 [Server] WARN org.apache.commons.lang.UnhandledException: Plugin BookStats v1.0 generated an exception while executing task 39835
    23.02 14:56:07 [Server] WARN Exception in thread "Craft Scheduler Thread - 530"
    23.02 14:56:03 [Server] INFO BookStats: Connected to database!
    23.02 14:56:03 [Server] WARN at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617)
    23.02 14:56:03 [Server] WARN at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:469)
    23.02 14:56:03 [Server] WARN at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:562)
    23.02 14:56:03 [Server] WARN at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:273)
    23.02 14:56:03 [Server] WARN at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:700)
    23.02 14:56:03 [Server] WARN at net.minecraft.server.v1_7_R1.ServerConnection.c(ServerConnection.java:77)
    23.02 14:56:03 [Server] WARN at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:147)
    23.02 14:56:03 [Server] WARN at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat.java:65)
    23.02 14:56:03 [Server] WARN at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java:28)
    23.02 14:56:03 [Server] WARN at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:829)
    23.02 14:56:03 [Server] WARN at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerConnection.java:984)
    23.02 14:56:03 [Server] WARN at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:706)
    23.02 14:56:03 [Server] WARN at me.Incomprehendable.WorldPlugins.FakeSimpleCommandMap.dispatch(FakeSimpleCommandMap.java:99)
    23.02 14:56:03 [Server] WARN at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    23.02 14:56:03 [Server] WARN at autosaveworld.commands.CommandsHandler.onCommand(CommandsHandler.java:111)
    23.02 14:56:03 [Server] WARN at autosaveworld.pluginmanager.ASWPluginManager.handlePluginManagerCommand(ASWPluginManager.java:45)
    23.02 14:56:03 [Server] WARN at autosaveworld.pluginmanager.ASWPluginManager.loadPlugin(ASWPluginManager.java:99)
    23.02 14:56:03 [Server] WARN at autosaveworld.pluginmanager.InternalUtils.loadPlugin(InternalUtils.java:107)
    23.02 14:56:03 [Server] WARN at me.Incomprehendable.WorldPlugins.FakePluginManager.enablePlugin(FakePluginManager.java:238)
    23.02 14:56:03 [Server] WARN at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:390)
    23.02 14:56:03 [Server] WARN at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:350)
    23.02 14:56:03 [Server] WARN at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:250)
    23.02 14:56:03 [Server] WARN at me.Zeshan.BookStats.Main.onEnable(Main.java:81)
    23.02 14:56:03 [Server] WARN at me.Zeshan.BookStats.MySQL.startUp(MySQL.java:39)
    23.02 14:56:03 [Server] WARN at me.Zeshan.BookStats.MySQL.alterTable(MySQL.java:58)
    23.02 14:56:03 [Server] WARN at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:622)
    23.02 14:56:03 [Server] WARN at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:779)
    23.02 14:56:03 [Server] WARN at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2570)
    23.02 14:56:03 [Server] WARN at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
    23.02 14:56:03 [Server] WARN at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
    23.02 14:56:03 [Server] WARN at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    23.02 14:56:03 [Server] WARN at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
    23.02 14:56:03 [Server] WARN at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
    23.02 14:56:03 [Server] WARN at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
    23.02 14:56:03 [Server] WARN at com.mysql.jdbc.Util.getInstance(Util.java:382)
    23.02 14:56:03 [Server] WARN at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    23.02 14:56:03 [Server] WARN at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    23.02 14:56:03 [Server] WARN at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    23.02 14:56:03 [Server] WARN at sun.reflect.GeneratedConstructorAccessor261.newInstance(Unknown Source)
    23.02 14:56:03 [Server] WARN com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'GiveBook'
    23.02 14:56:03 [Server] INFO BookStats: Connecting to MySQL..
    23.02 14:56:03 [Server] INFO Enabling BookStats v1.0
    spigot 1.7.2
     
  12. And can you add a playerid column to store player name? I want to make a web interface to show player's stats, too...
     
  13. And this one:
    Code (Text):
    23.02 15:34:29 [Server] INFO ... 3 more
    23.02 15:34:29 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    23.02 15:34:29 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftTask.run(CraftTask.java:58)
    23.02 15:34:29 [Server] INFO at me.Zeshan.BookStats.Main$1$1.run(Main.java:146)
    23.02 15:34:29 [Server] INFO Caused by: java.lang.NoSuchMethodError: org.bukkit.Bukkit.getOnlinePlayers()Ljava/util/Collection;
    23.02 15:34:29 [Server] INFO at java.lang.Thread.run(Thread.java:745)
    23.02 15:34:29 [Server] INFO at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    23.02 15:34:29 [Server] INFO at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    23.02 15:34:29 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
    23.02 15:34:29 [Server] WARN org.apache.commons.lang.UnhandledException: Plugin BookStats v1.0 generated an exception while executing task 48916
    23.02 15:34:29 [Server] WARN Exception in thread "Craft Scheduler Thread - 650"
     
  14. zeshan321 updated BookStats with a new update entry:

    MySQL and more options

    - Fixed making dupe MySQL entries
    - Fixed table alter attempting to alter when the column already exists
    - Added two options to prevent dropping and dragging items
    - Added name column to database.
    - Added support for older versions.

    Code (Text):

    On Join:
        # Give BookStats on join
        Give Book: false
        # Only give one book
        Give Limit: true
        # Set which slot the book should be put in. If set to 0 it will just add it to the players inventory.
        Slot: 0
        # Prevent dropping books.
        Prevent Drop: false
        # Prevent dragging books or moving book.
        Prevent Drag: false
     
    Read the rest of this update entry...
     
    #15 ZeeZee, Feb 23, 2015
    Last edited: Feb 23, 2015
  15. @ferrinweb Fixed the issues you were having in the latest update. And added the name column.

    On another note I'm also taking suggestions for new place holders.
     
  16. I got one add a place holder for time Played! :)
     
  17. I'll add that in the next update. :)
     
  18. Using 1.3
    New player log on error. Using mysql.

    [11:57:20 INFO]: UUID of player brandcc is 7f882481-4460-46c3-b1e9-47bee8624e72
    [11:57:20 INFO]: brandcc[/127.0.0.1:57198] logged in with entity id 245 at ([wor
    ld] 244.33183647990955, 69.0, 269.19810919972093)
    [11:57:20 WARN]: Exception in thread "Craft Scheduler Thread - 1"
    [11:57:20 WARN]: Exception in thread "Craft Scheduler Thread - 2"
    [11:57:20 WARN]: org.apache.commons.lang.UnhandledException: Plugin BookStats v1
    .0 generated an exception while executing task 30
    at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftAsyncTask.run(CraftAsyn
    cTask.java:56)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NullPointerException
    at me.Zeshan.BookStats.MySQL.getValue(MySQL.java:186)
    at me.Zeshan.BookStats.DataHandler$1.run(DataHandler.java:25)
    at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftTask.run(CraftTask.java
    :71)
    at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftAsyncTask.run(CraftAsyn
    cTask.java:53)
    ... 3 more

    [11:57:20 WARN]: org.apache.commons.lang.UnhandledException: Plugin BookStats v1
    .0 generated an exception while executing task 29
    at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftAsyncTask.run(CraftAsyn
    cTask.java:56)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NullPointerException
    at me.Zeshan.BookStats.MySQL.doesExist(MySQL.java:205)
    at me.Zeshan.BookStats.MySQL$2.run(MySQL.java:120)
    at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftTask.run(CraftTask.java
    :71)
    at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftAsyncTask.run(CraftAsyn
    cTask.java:53)
    ... 3 more
     
  19. Please use pastebin or something similar for errors. Also can I see your config? Just remember to remove the password or pm me the config.