TheBrokenDown / PlayTimeCounter

Sponge plugin that counts players' playing time.
https://ore.spongepowered.org/TheBrokenDown/PlayTimeCounter
0 stars 0 forks source link

Keep getting the message "Plugin Disabled" #3

Open XMaxTheKillerX opened 5 years ago

XMaxTheKillerX commented 5 years ago

Hi everybody.

I am working on getting the playtimecounter plugin to work, I created a bd file with sqlite without a problem. I linked it witin the config file: **# Configuration options related to the Sql service, including connection aliases etc sql {

Aliases for SQL connections, in the format jdbc:protocol://[username[:password]@]host/database

    aliases {TimePlayed"="jdbc:sqlite:/home/minecraft/multicraft/database/timeplayed.db}**

And I changed the name within the playtimecounter.conf: # SQL alias name (from global.conf) dbAliasName=TimePlayed

Is there something that I am missing?

Thank you in advance

TheBrokenDown commented 5 years ago

Hello. Maybe the problem is that you missed two double quotes? sql { aliases { "TimePlayed"="jdbc:sqlite:/home/minecraft/multicraft/database/timeplayed.db" } }

XMaxTheKillerX commented 5 years ago

Thank you for your reply, but it still doesn`t work. I found out that when I changed the config file that the alias resets when i reboot the server, Do you maybe know what caused this?

TheBrokenDown commented 5 years ago

I think it happens because alias has the wrong format (I've seen it before). Try set the alias this way: https://gist.github.com/TheBrokenDown/bd446a1fc1df3886b88f9e73225b4d85 Make sure that directory database exists in your server directory

XMaxTheKillerX commented 5 years ago

Thanks for your response but it still doesnt work Here are some screens of my setup: https://prnt.sc/msommd https://prnt.sc/mson15 https://prnt.sc/msonl7

Do I maybe need to create the tables and row within the database?

TheBrokenDown commented 5 years ago

Oh... You should set isEnabled in global section to true. :)

XMaxTheKillerX commented 5 years ago

It still doesnt work, still gives the message Plugin Disabled

XMaxTheKillerX commented 5 years ago

Nvm after a restart it worked, Thank you!

XMaxTheKillerX commented 5 years ago

I'm sorry to bother you again, i still cant get it to fully work. Now when I enable the plugin it doesn't seem to load it, it sais the plugin is not recognised.

TheBrokenDown commented 5 years ago

You don't need to apologize, I'm always happy to help. Can you provide screenshot of the error?

XMaxTheKillerX commented 5 years ago

https://prnt.sc/msqt6r https://prnt.sc/msqtd5

XMaxTheKillerX commented 5 years ago

And also the database file is empty, is that normal?

TheBrokenDown commented 5 years ago

Can you provide server's log file? Or error from console.

XMaxTheKillerX commented 5 years ago

here it is: https://pastebin.com/R4PsEQPG

TheBrokenDown commented 5 years ago

This is an error caused by another plugin (AurionsVoteListener). Please provide the server log file.

XMaxTheKillerX commented 5 years ago

https://pastebin.com/vcxbbL4r, I tried and disabled the VoteListener plugin but it still diddn`t work

XMaxTheKillerX commented 5 years ago

It sais that there is an error with the database link, I am runnin go Debian 9 what does the path need to be to link it successfully?

TheBrokenDown commented 5 years ago

java.lang.IllegalArgumentException: URL /home/minecraft/multicraft/servers/server1/Database/Playtime.db is not a valid JDBC URL

The problem is in file path. If there is no difference where the file will be located, specify relative path: "TimePlayed"="jdbc:sqlite:timeplayed.db" (timeplayed.db will be created in server root dir)

XMaxTheKillerX commented 5 years ago

It still dosn`t work fully, do you maybe have skype or discord that you can maybe take a look at it?

XMaxTheKillerX commented 5 years ago

The database is filed with default items, but wont fill with played time data.

https://pastebin.com/V6G2G3UP

XMaxTheKillerX commented 5 years ago

Now there are items in the db file, but i still cant request them

https://pastebin.com/0WiiuJdk

it still sais Player with specified names not found

XMaxTheKillerX commented 5 years ago

And also when I do playtimetop this it was it returns: 05.03 11:54:11 [Server] pool-3-thread-377/INFO ==========| TOP |========== 05.03 11:54:11 [Server] pool-3-thread-377/INFO no data

TheBrokenDown commented 5 years ago

The database is filed with default items, but wont fill with played time data.

https://pastebin.com/V6G2G3UP

Looks like a bug. It works properly with mysql, but doesn't work with sqlite. I'll try to fix that.