brainsynder-Dev / SimplePets

A simple to use companion/pets plugin for a Spigot Minecraft server
https://www.spigotmc.org/resources/100106/
GNU General Public License v3.0
60 stars 38 forks source link

Problem with MySQL #24

Closed TomekkStorm closed 5 years ago

TomekkStorm commented 6 years ago

Hello i've changed my MySQL variables:

MySQL: Enabled: true Host: 123.456.789.123 Port: '3306' DatabaseName: secret Login: Username: secret_user Password: secret Options: UseSSL: true AutoReconnect: true

I don't know where the problem is and this is the output from the console:

[13:53:04 INFO]: [SimplePets Debug] Loading Config.yml... [13:53:04 ERROR]: Cannot load plugins/SimplePets/Config.yml org.bukkit.configuration.InvalidConfigurationException: while parsing a block mapping in 'string', line 51, column 3: Enabled: true ^ expected , but found BlockMappingStart in 'string', line 57, column 4: Password: secret ^

    at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:55) ~[minecraft_spigot_server.jar:git-Spigot-7754231-9a1f5ee]
    at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:162) ~[minecraft_spigot_server.jar:git-Spigot-7754231-9a1f5ee]
TomekkStorm commented 6 years ago

And if i'm not using MySQL and type /pets i've got these output:

[14:17:02 ERROR]: Could not pass event PetInventoryOpenEvent to SimplePets v4.0 org.bukkit.event.EventException: null at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[minecraft_spigot_server.jar:git-Spigot-7754231-9a1f5ee] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[minecraft_spigot_server.jar:git-Spigot-7754231-9a1f5ee] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:499) [minecraft_spigot_server.jar:git-Spigot-7754231-9a1f5ee] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [minecraft_spigot_server.jar:git-Spigot-7754231-9a1f5ee] at simplepets.brainsynder.menu.inventory.list.SelectionMenu.open(SelectionMenu.java:131) [SimplePets.jar:?] at simplepets.brainsynder.menu.inventory.CustomInventory.open(CustomInventory.java:78) [SimplePets.jar:?] at simplepets.brainsynder.commands.SPCommand.onCommand(SPCommand.java:100) [SimplePets.jar:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [minecraft_spigot_server.jar:git-Spigot-7754231-9a1f5ee]

brainsynder-Dev commented 6 years ago

Your first error is because you have an invalid config... This is most of the time caused when you use tabs instead of spaces, an easy way to fix it is to reset the config (Stop the server, delete the config, then start server).

As for your second issue that is caused because the values it is looking for in the config can not be found (due to the invalid config)

TomekkStorm commented 6 years ago

I have deleted the directory Simplepets and have it recreated again. If I do not adapt anything it works fine. As soon as I write just after blocking Worlds: -pvp following -pvparena1 appear in the console error.

brainsynder-Dev commented 6 years ago

That's because it is not in the correct format. Here is the correct format for your example:

blocking Worlds: 
- 'pvp'
- 'pvparena1'
TomekkStorm commented 6 years ago

Hmm, there are no '' characters in my config.yml and they do not exist on the webpage either. I wrote the following:

After a server restart the Config.yml was reset automatically