Database Addres Issues
mowmowkittycat opened this issue ยท 3 comments
Description
If there is a colon anywhere in the hostname it thinks the hostname contains the port and tries to parse it as an integer thus crashing the plugin
Reproduction Steps
Go to mongodb.com make a mongodb and connect it to your server with luck perms and it will error saying a parsing integer error
Expected Behaviour
it should just work
Server Details
1.17.1
LuckPerms Version
v5.4.9 is that latest i have tested it on
Logs and Configs
`[00:00:15 ERROR]: [LuckPerms] Failed to init storage implementation
java.lang.NumberFormatException: For input string: "//Admin"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?]
at java.lang.Integer.parseInt(Integer.java:654) ~[?:?]
at java.lang.Integer.parseInt(Integer.java:786) ~[?:?]
at me.lucko.luckperms.common.storage.implementation.mongodb.MongoStorage.init(MongoStorage.java:132) ~[?:?]
at me.lucko.luckperms.common.storage.Storage.init(Storage.java:117) ~[?:?]
at me.lucko.luckperms.common.storage.StorageFactory.getInstance(StorageFactory.java:88) ~[?:?]
at me.lucko.luckperms.common.plugin.AbstractLuckPermsPlugin.enable(AbstractLuckPermsPlugin.java:169) ~[?:?]
at me.lucko.luckperms.bukkit.LPBukkitBootstrap.onEnable(LPBukkitBootstrap.java:177) ~[?:?]
at me.lucko.luckperms.bukkit.loader.BukkitLoaderPlugin.onEnable(BukkitLoaderPlugin.java:51) ~[LuckPerms-Bukkit-5.4.9.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.17.1.jar:git-Paper-408]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.17.1.jar:git-Paper-408]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.17.1.jar:git-Paper-408]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:561) ~[patched_1.17.1.jar:git-Paper-408]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:475) ~[patched_1.17.1.jar:git-Paper-408]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:288) ~[patched_1.17.1.jar:git-Paper-408]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1220) ~[patched_1.17.1.jar:git-Paper-408]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-408]
at java.lang.Thread.run(Thread.java:833) ~[?:?]`
Extra Details
<3
storage-method: MongoDB
address: mongodb+srv://Admin:[email protected]/myFirstDatabase?retryWrites=true&w=majority:27017
database: minecraft
username: Admin
password: blank
ok im wrong there is a specific value for MongoDB this should be detailed more visibly
this should be detailed more visibly
While this is solved, should you have queries as to other storage-types, it is documented on the wiki for you!
https://luckperms.net/wiki/Storage-types