AppleDash / SaneEconomy

Finally, a sane economy plugin for Bukkit.

Home Page:https://www.spigotmc.org/resources/saneeconomy-simple-but-featureful-economy.26223/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide better MySQL config examples

Speak2Erase opened this issue · comments

Currently, I'm struggling to properly set MySQL up as a backend (Because I want the eco to sync over my servers, I'm using bungee) but I can't seem to get the formatting right. It's valid YAML but the plugin rejects it. I can't seem to figure out how to properly format and indent my config, and the config examples in the wiki aren't of much help since they just provide the valid options and not what order they should go in, etc.
Here is my config.

# Settings pertaining to the backend. Check the wiki for valid values here.
backend:
  type: mysql
  hostname: 'localhost'
  port: '3306'
  username: 'root'
  password: '*****'
  databaseName: 'hex'
  prefix: 'economy_'
currency:
  name:
    singular: birbohex
    plural: hex
  format: '0.00'
  grouping: 3
  grouping-separator: ','
chat:
  prefix: '&b[&9HEX&b]&r '
economy:
  start-balance: 100.0 # If this is greater than zero, players will be given this amount on their first join.
  notify-start-balance: true # Whether to send players a message when they receive their starting balance.
  server-account: '$SERVER$' # Economy operations on an account with this name will appear to have an infinite balance.
  baltop-update-interval: 300 # How often, in seconds, to reload the content of /baltop from the database.
  notify-admin-give: false # Whether to notify players when /ecoadmin give is used on them.
  notify-admin-take: false # Whether to notify players when /ecoadmin take is used on them.
  notify-admin-set: false # Whether to notify players when /ecoadmin set is used on them.
  pay-offline-players: true # Whether to allow paying offline players or not.
multi-server-sync: true # Experimental balance syncing without player rejoins, across BungeeCord networks.
update-check: true # Whether to check for updates to the plugin and notify admins about them.
locale-override: false # Whether to force the server's locale to be en_US.
debug: false # Debug mode, leave this set to false.
metrics: true # Whether to send anonymous metrics about the plugin's usage back to the developers, useful for fixing crashes.

Can you give me more info on what you mean by "the plugin rejects it"?

It outputs this in console


The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
	at org.appledash.saneeconomy.shaded.hikari.pool.HikariPool.checkFailFast(HikariPool.java:516) ~[?:?]
	at org.appledash.saneeconomy.shaded.hikari.pool.HikariPool.<init>(HikariPool.java:118) ~[?:?]
	at org.appledash.saneeconomy.shaded.hikari.HikariDataSource.<init>(HikariDataSource.java:71) ~[?:?]
	at org.appledash.saneeconomy.shaded.sanelib.database.SaneDatabase.initDataSource(SaneDatabase.java:97) ~[?:?]
	at org.appledash.saneeconomy.shaded.sanelib.database.SaneDatabase.<init>(SaneDatabase.java:28) ~[?:?]
	at org.appledash.saneeconomy.utils.database.MySQLConnection.<init>(MySQLConnection.java:23) ~[?:?]
	at org.appledash.saneeconomy.economy.backend.type.EconomyStorageBackendMySQL.<init>(EconomyStorageBackendMySQL.java:30) ~[?:?]
	at org.appledash.saneeconomy.utils.SaneEconomyConfiguration.loadBackend(SaneEconomyConfiguration.java:85) ~[?:?]
	at org.appledash.saneeconomy.utils.SaneEconomyConfiguration.loadEconomyBackend(SaneEconomyConfiguration.java:42) ~[?:?]
	at org.appledash.saneeconomy.SaneEconomy.loadConfig(SaneEconomy.java:177) ~[?:?]
	at org.appledash.saneeconomy.SaneEconomy.onEnable(SaneEconomy.java:57) ~[?:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.3.jar:git-Paper-246]
	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.16.3.jar:git-Paper-246]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.16.3.jar:git-Paper-246]
	at org.bukkit.craftbukkit.v1_16_R2.CraftServer.enablePlugin(CraftServer.java:501) ~[patched_1.16.3.jar:git-Paper-246]
	at org.bukkit.craftbukkit.v1_16_R2.CraftServer.enablePlugins(CraftServer.java:415) ~[patched_1.16.3.jar:git-Paper-246]
	at net.minecraft.server.v1_16_R2.DedicatedServer.init(DedicatedServer.java:205) ~[patched_1.16.3.jar:git-Paper-246]
	at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:939) ~[patched_1.16.3.jar:git-Paper-246]
	at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.3.jar:git-Paper-246]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: 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.
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:403) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:335) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2187) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2220) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2015) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:768) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) ~[patched_1.16.3.jar:git-Paper-246]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:403) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:385) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:323) ~[patched_1.16.3.jar:git-Paper-246]
	at org.appledash.saneeconomy.shaded.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95) ~[?:?]
	at org.appledash.saneeconomy.shaded.hikari.pool.PoolBase.newConnection(PoolBase.java:316) ~[?:?]
	at org.appledash.saneeconomy.shaded.hikari.pool.HikariPool.checkFailFast(HikariPool.java:506) ~[?:?]
	... 19 more
Caused by: java.net.UnknownHostException: null: Name or service not known
	at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[?:?]
	at java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929) ~[?:?]
	at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1515) ~[?:?]
	at java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848) ~[?:?]
	at java.net.InetAddress.getAllByName0(InetAddress.java:1505) ~[?:?]
	at java.net.InetAddress.getAllByName(InetAddress.java:1364) ~[?:?]
	at java.net.InetAddress.getAllByName(InetAddress.java:1298) ~[?:?]
	at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:188) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:299) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2187) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2220) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2015) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:768) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) ~[patched_1.16.3.jar:git-Paper-246]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:403) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:385) ~[patched_1.16.3.jar:git-Paper-246]
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:323) ~[patched_1.16.3.jar:git-Paper-246]
	at org.appledash.saneeconomy.shaded.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95) ~[?:?]
	at org.appledash.saneeconomy.shaded.hikari.pool.PoolBase.newConnection(PoolBase.java:316) ~[?:?]
	at org.appledash.saneeconomy.shaded.hikari.pool.HikariPool.checkFailFast(HikariPool.java:506) ~[?:?]
	... 19 more

..And then it resets the config.