You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
** Please ask your question and provide whatever background or supporting information you think might be relevant: **
I am currently trying to register a codec that I have created for the Bukkit ItemStack class but I cannot figure out how to register it. I have already looked at both MongoDB's and Morphia's documentation but was unable to find anything. Here is my Mongo Registration class
object MongoDatabase {
lateinitvar datastore:Datastorevar connect by Delegates.notNull<Boolean>()
funinit() {
connect =falsetry {
val mongoUri =ClickerServer.getInstance().config.getString("mongo.uri")
if (mongoUri ==null) {
ClickerServer.getInstance().logger.severe("MongoDB URI not found in config.yml")
ClickerServer.getInstance().server.pluginManager.disablePlugin(ClickerServer.getInstance())
throwIllegalStateException("MongoDB URI not found in config.yml")
}
datastore =Morphia.createDatastore(MongoClients.create(mongoUri), ClickerServer.getInstance().config.getString("mongo.db")!!)
datastore.mapper.config.packages(listOf("dev.reassembly.clickerserver.models"))
// TODO: Register Codec here
connect =true
} catch (e:Exception) {
connect =false
e.printStackTrace()
}
}
}
** Please complete the following information: **
Server Version: Unsure, I'm using mongo atlas if that's the question
Driver Version: Whichever one comes bundled in morphia
Morphia Version: 2.4.11
The text was updated successfully, but these errors were encountered:
** Please ask your question and provide whatever background or supporting information you think might be relevant: **
I am currently trying to register a codec that I have created for the Bukkit ItemStack class but I cannot figure out how to register it. I have already looked at both MongoDB's and Morphia's documentation but was unable to find anything. Here is my Mongo Registration class
** Please complete the following information: **
Server Version: Unsure, I'm using mongo atlas if that's the question
Driver Version: Whichever one comes bundled in morphia
Morphia Version: 2.4.11
The text was updated successfully, but these errors were encountered: