MongoSK by Romitou

The MongoDB database management addon for Skript.

















The still alive update 136 days, 2 hours and 1 minute ago

Note: A quick update on the status of the addon: I'm aware that no updates have been made in a long time. But I come with good news: a new version 3 of MongoSK is in the pipeline. It will integrate real async operations and lots of new tools and methods to make Mongo operations easier. Nothing new will be added to MongoSK 2, but existing and future requests will be added to MongoSK 3. If you have any comments about the addon and what you'd like to see in the future, I'm always available to listen.

The major addition of this update is support for Skript 2.8 and some Mongo driver updates. That's it for today. Enjoy!

View Update

New stable release 729 days, 1 hour and 34 minutes ago

In accordance with MongoSK's release logic, this version includes versions 2.2.1 and 2.2.2 as well as some not yet released modifications that have been tested by several users. So make way for MongoSK 2.3.0! After a year without a new stable version, here is a new one that introduces a lot of new features. Let's start:

Highlighted additions
✨ Introduce embedded value beta expression
I've been asked for this phrase a lot, so here it is! It is sometimes redundant to extract a document from a document from a document etc... and undertake several data manipulations on several lines. To remedy this, this expression will only ask you the path (MongoSK specific syntax, be careful) as follows:, foo[0].bar or[2] for example.

✨ Introduce sections support with new Skript's API and support legacy sections
Skript has recently released an API to create sections in a cleaner way directly integrated with Skript. However, this change has resulted in addons being required to use their new system. So I've been working to make sure that versions that are compatible with this change use it, but I've also been working to keep backwards compatibility for versions that don't use Skript's new API. To summarize, no changes are introduced by this release, only section support for recent versions of Skript.

✨ Introduce mongo keys / values expressions
Also requested by many users, these expressions simply allow you to retrieve all the keys or values of a document. Practical, isn't it?

✨ Introduce beta distinct query
The distinct query is useful when you want to retrieve a specific field from each document in a given collection. For example, if you have documents with a

field, you can use this expression to retrieve all the
fields of the documents in the collection. ⚠️ This expression does not accept constructed queries, only the basic find query is currently supported.

Full Changelog:

I remind you that MongoSK has a Discord community on which you can exchange with other MongoSK users and contributors to get help and give us your opinions and what you would like to have in the addon!

That's it for today. Enjoy!

View Update

Bug fix time! 1038 days, 8 hours and 17 minutes ago

This update brings a major bug fix to the Mongo document creation effects sections. The behavior of the current syntax remains unchanged. However, a new feature has been added: you can now implicitly specify the type of fields you want to add.


set {_doc} to a new mongo document with:
mongo "a": 1, 2 and 3
mongo list "b": 4, 5 and 6
mongo list "c": 1
mongo "d": 7
mongo value "e": 8
mongo value "f": 9 and 10

➡️ {"a": [1, 2, 3], "b": [4, 5, 6], "c": [1], "d": 7, "e": 8, "f": 9}

Then, a beta syntax was added because I was asked for it a lot: the distinct query. The distinct query is useful when you want to retrieve a specific field from each document in a given collection. For example, if you have documents with a "name" field, you can use this expression to retrieve all the "name" fields of the documents in the collection. Useful, isn't it?

That's it for today. Enjoy!

View Update

New features! 1092 days, 3 hours and 45 minutes ago

In the continuity of the versioning cycle of MongoSK, consisting in using the patch versions of beta releases as and when features are added, the previous beta versions have proven to be stable. It's time to release MongoSK 2.2.0. Let's see what's new.

Major changes

- Fix query execution of advanced queries
- Fix the server expression that did not support color codes properly
- Add support for Skript 2.6+
- Add support for MC 1.8+
- Add ability to disable codecs:

As you know, MongoSK comes with codecs, which allow users to easily store information not supported by MongoDB. For example: locations, players, dates, etc. It is now possible for advanced users who know what they are doing to disable some codecs so that they are no longer operational. Here is how to do it if you want to disable the date and player codecs for example:

# ...
# The list of codec names that you do not want to be activated. One per line, starting with a hyphen.
- date
- player

- Add easy configuration of timeouts:

It is now possible to easily customize the timeout of the Mongo driver operations! As you know, the default timeouts are 30 seconds, which means that the main server thread will be blocked for 30 seconds (if your request is not executed asynchronously). From now on, the default timeout is set to 10 seconds, and can be customized in the MongoSK configuration as follows:
# The timeouts represent the maximum time to wait before the action is completed.
# If the action is not completed before the time defined below, it will be aborted.
# Timeouts are expressed in milliseconds. It is not recommended to define a timeout greater than 10000 milliseconds.
# The connection timeout to your server.
connect: 10000
# The timeout for reading the data received from the server.
read: 10000

For more information about some of the changes, see the 2.0.1 & 2.0.2 releases. That's it for today. Enjoy!

View Update

Compatibility fixes 1096 days, 1 hour and 57 minutes ago

MC 1.8 support
This version brings the modification of the Maven repository of the Mongo driver, now hosted by myself. The reason is that some issues have been fixed on my fork, adding support among others for 1.8 servers! This modified version of the driver does not use SLF4J anymore, which was not present on these servers.

Skript 2.6 compatibility fix
The second fix brings full compatibility with Skript 2.6. The effect sections have been fixed, and should no longer display warnings in the console.

That's all for today. Have fun!

View Update

Bug fix release 1122 days, 23 hours and 11 minutes ago

This version fixes a major problem with advanced queries. Indeed, some properties of the Skript query were not correctly "translated" to make a Mongo query to the database, returning an incorrect result. Everything is fixed now.

In addition, compatibility with Skript 2.6-alpha1 has been added.
Note that this version of Skript remains unstable and should not be used in production.

⚠️ Special notice to servers using the visualEffect codec: due to Skript changes and in order to be compatible with 2.6-alpha1, this codec will no longer work with versions before Skript 2.6. If you use it, it is not recommended to upgrade to MongoSK 2.1.1, but to wait for Skript 2.6 to be stable in order to upgrade MongoSK.

As always, I remain available if you need help or more information!

View Update

Some new syntaxes! 1152 days, 21 hours and 38 minutes ago

The previous patch versions (2.0.1, 2.0.2 & 2.0.3) proved to be stable and without bugs, so here is a minor version (2.1.0)! This new version also brings some new features:

✨ Features

- Update Mongo driver from version 4.2.2 to 4.3.0-beta1
- Remove severe logging when a field does not exist in a document
- Add an is empty document condition
- Add an has value document condition
- Add an has key document condition
- Add Mongo sections!

As you know, the creation of simple documents can sometimes be long and boring, because of the many lines that sometimes seem unnecessary.
To create a simple document representing the JSON object below, you can now use a new syntax!

"simpleField": "Hello!",
"nestedObject": {
"number": 100,
"boolean": false

set {_nested} to a new mongo document with:
mongo "number": 100
mongo "boolean": false
set {_doc} to a new mongo document with:
mongo "simpleField": "Hello!"
mongo "nestedObject": {_nested}
broadcast {_doc}'s mongo json

These new syntaxes are all prefixed with mongo to ensure they do not conflict with other addons.
As a reminder, they are currently in beta, and their patterns may be changed if there are problems.

That's it for today, enjoy!

View Update

New features 1169 days, 9 hours and 39 minutes ago

Finally we come to an update with some new features!
Right away, recap:

- Fix syntaxes typos
- Make Skript dependent instead of softdependent (should fix some issues on some MC hosting providers)

- Introducing array support in joined filters expression
- Introducing Mongo collection creation
- Introducing Mongo database and collection drops
- Introducing some features related to documents
- Introducing Mongo commands

That's it for today. And that's not bad.
Thanks to you for your feedback! As always, don't hesitate to contact me if you have any problem.

View Update

Important bug fixes 1189 days, 3 hours and 13 minutes ago

This new update brings many fixes. This one doesn't bring any additional big feature, because like the previous one, I prefer to concentrate on the bugs to be solved. But don't worry, some new features are still being developed in parallel!


  • Better error catching (6018854)
  • Fix some errors on the mongo document field expression (53c2b7e)
  • Fix issues with mongo document lists (e6c3767)
  • Fix not recognised syntaxes when using numbers (fe23964)
  • Fix incorrect query time display (72910d0)
  • Fix error with empty value filters, like mongosk filter where filter "foo" is set (2fb5cfd)
  • Fix entity codec (ec80be3)
  • Fix documentations with invalid examples (e215234)

✨ Features

  • You can now delete documents without having to specify a filter, as MongoSK will set an empty filter by default if you do not specify one. The same goes for defining documents (9258c56)

As always, if you have any suggestions, problems or need help, I am always available to help you!

View Update

Some bug fixes 1198 days, 22 hours and 2 minutes ago

Thank you all for your feedback on MongoSK 2.0.0. Thanks to you, some issues have been solved. Let's review them:

- Mongo document lists not being deserialized
- Fixing some codecs
- Severe error when a field is not present in a document

For this update, no additions have been made, while we receive feedback on the stability of this first v2 version. New features will be added soon.

View Update

First 2.0.0 release 1202 days, 4 hours and 31 minutes ago

As expected and planned for some time, here it is at last! MongoSK v2 makes place. On the program:

  • ⚡️ Database queries are executed asynchronously
    The code has been rewritten using the mongodb-driver-reactivestreams library

  • ⚙️ Automatic and intelligent transformation of all sorts of data
    You can now store all types of Skript as items, players, blocks, etc. MongoSK does the job for you!

  • Simple and understandable debugging to quickly identify problems
    The information are relevant and useful for both novice users and developers of the plugin

  • Addition of advanced queries for specific queries
    You are now able to target more precise data in your queries with a lot of options

  • More logical and smart syntaxes
    Syntaxes have been reworked to be more consistent and logical

So, how to update from MongoSK 1 to MongoSK 2?
All information is available on a specially created discussion here: #23. If you still need help, you can come to the Discord server or ask for help in GitHub discussions. All links are on the main page.

View Update

Introducing Mongo filters 1252 days, 21 hours and 18 minutes ago

As expected, here is a small update bringing a new feature. For the time being, this is a pre-release. A stable version will be released in a few days if it turns out that these new features are stable and do not add any sudden changes.

  • ✨ Introducing Mongo filters
  • ⚡ Little performances improvements by using better methods to retrieve all datas

As always, I am always open to any comments or suggestions!

View Update

Some improvements and new features 1256 days, 21 hours and 57 minutes ago

Originally wanting to publish bigger updates with more content, I will now be doing smaller updates but on a more regular schedule. Here is a quick summary of this update:

- ✨ Adding more error messages and better exceptions handling
- Remove Skript-based events as they're useless and will be replaced in the next update
- ✨ Better and beautiful console logging
- ✨ Introducing more document features
- ⚗️ Introducing experimental codecs
Codecs are used to serialize Java objects so that they can be saved in a document.
Clearly, they make it possible to save Skript types other than what MongoDB supports.
The restoration of the correct data from a document has not been implemented yet.

The GitHub wiki is now online!

Thank you for your suggestions and sorry for the delay of this update! As usual, I remain open to any suggestion or remark.

View Update

MongoSK 1306 days, 3 hours and 28 minutes ago


This add-on is dedicated to data management with a MongoDB host. Its advantage is that it is a document database built on a scalable architecture that has become popular with developers of all types who build scalable applications.

  • Multiple clients support
    You have several hosts, and you want to connect to them?
    No problem, MongoSK can manage several connections!

  • Creation, deletion of databases, collections and documents
    Create new collections, insert new documents ...
    Warning: you need to enable options in MongoSK to activate the drop effects.

  • Simple and intuitive document management
    Retrieve, add values from MongoDB documents in just a few lines.
    The documents support Skript lists and MongoDB types only for the moment.

I love Open Source, you can find the sources of MongoSK on GitHub.
You have a problem or a question? Feel free to open a issue.

Are you not familiar with names like host, server, database, collections, documents? You don't understand how data is structured with MongoDB? Here is one of my schema representing how it works:

View Update

© Copyright 2014-2024 skUnity

All rights reserved.