Appwrite Minecraft SDK Utility Minecraft plugin that creates persistent data storage while using Appwrite as a database. This plugin was a missing piece on the scene for years! Finally, with Appwrite Minecraft SDK, storing data is as simple as
A server makes no longer needs to pay over-priced developers just because there is no simple way to store data without writing Java code.
Showcase I am a server administrator, I have no coding experience, and I want to customize my server...
I have a dungeon minigame already created, but I don't want to let players play it infinitely; instead, I want to make this minigame a special reward. First, I start by running a command to define the variable availableDungeonKeys when a player first joins my server and set it to 0:
Great, now when a new player joins, he will automatically have 3 keys.
When starting a minigame, I can use the placeholder
to get the value and check if the amount is higher than 0. If that is the case, I can run a command to take 1 key from the player:
Now that I have taken one key from the player, I can let him into a minigame. Tada I have just created a system where players can join my minigame, but they can only do it 3 times.
Finally, I add an option to purchase more keys to my web-store and run the command once they purchase the keys:
Let's take a look at another scenario... Let's say I need an energy system so the player can only join the minigame when he has at least 1 energy. Instead of buying it, he needs to collect 25 fragments in order to convert it to 1 energy. Fragments can be obtained by breaking a special block on the spawn. How do I achieve that? It's extremely simple!
Let's start.. First, define variables when a player joins for the first time:
Notice how I marked fragments local because I want to lose the value when a player leaves the server - I don't want to store that.
Now, when a player breaks the specific block, I can run a command to increase his fragments count:
In this event, I also use placeholder
to check if he has at least 25, and if that is the case, I reset it to 0 while increasing the energy count:
Wohoo, energy system finished Here is a working example of such a logic:
Start / Restart the server to trigger the first load of the plugin
Insert Appwrite endpoint, project ID and API key into the generated config.yml file
Restart the server
Enjoy Appwrite Database plugin!
⌨️ Commands Aliases: appwrite | aw Example of commands usage:
Help
Command to show help menu in the game
Usage: /appwrite help
Version
Command to show the currently installed version
Usage: /appwrite version
Aliases: version | ver | v
Permisson: appwrite.version
Database
Command for work with the data storage
Aliases: database | db
Sub commands:
Player
Command to work with data of a specific player
Aliases player | p
Sub commands:
Save
Command for save cache into the database. This is triggered automatically when player leaves the server, but you can use this command to store it at a specific point.
Usage: appwrite database player save <player>
Aliases: save | s
Permission: appwrite.player.save
Set Local
Command to set a value of local variable
Usage: appwrite database player set-local <player> <key> <value>
Aliases: set-local | sl
Permission: appwrite.player.set.local
Set Remote
Command to set a value of remote variable
Usage: appwrite database player set-remote <player> <key> <value>
Aliases: set-remote | sr
Permission: appwrite.player.set.remote
Add Local
Command to increase a value of local variable
Usage: appwrite database player add-remote <player> <key> <value>
Aliases: add-local | al
Permission: appwrite.player.add.local
Add Remote
Command to increase a value of remote variable
Usage: appwrite database player add-remote <player> <key> <value>
Aliases: add-remote | ar
Permission: appwrite.player.add.remote
Take Local
Command to decrease a value of local variable
Usage: appwrite database player take-local <player> <key> <value>
Aliases: takel-local | tl
Permission: appwrite.player.take.local
Take Remote
Command to decrease a value of remote variable
Usage: appwrite database player take-remote <player> <key> <value>
Aliases: take-remote | tr
Permission: appwrite.player.take.remote
Get
Command to get a value of remote variable
Usage: appwrite database player get <player> <key>
Aliases: get | g
Permission: appwrite.player.get
Global
Command to work with global database. Here you can store variables that are shared for everyone one the server.
Aliases global | g
Sub commands:
Save
Command to save the global cache into database
Usage: appwrite database global save
Aliases: save | s
Permission: appwrite.global.save
Set Local
Command to set a value of local variable
Usage: appwrite database global set-local <key> <value>
Aliases: set-local | sl
Permission: appwrite.global.set.local
Set Remote
Command to set a value of remote variable
Usage: appwrite database global set-remote <key> <value>
Aliases: set-remote | sr
Permission: appwrite.global.set.remote
Add Local
Command to increase a value of local variable
Usage: appwrite database global add-remote <key> <value>
Aliases: add-local | al
Permission: appwrite.global.add.local
Add Remote
Command to increase a value of remote variable
Usage: appwrite database global add-remote <key> <value>
Aliases: add-remote | ar
Permission: appwrite.global.add.remote
Take Local
Command to decrease a value of local variable
Usage: appwrite database global take-local <key> <value>
Aliases: takel-local | tl
Permission: appwrite.global.take.local
Take Remote
Command to decrease a value of remote variable
Usage: appwrite database global take-remote <key> <value>
Aliases: take-remote | tr
Permission: appwrite.global.take.remote
Get
Command to get a value of global variable
Usage: appwrite database global get <key>
Aliases: get | g
Permission: appwrite.global.get
Reload
Command to reload configs
Aliases reload | r
Sub commands:
All
Command to reload all configs
Usage: appwrite reload all
Aliases: all | a
Permission: appwrite.reload.all
Messages
Command to reload messages config
Usage: appwrite reload messages
Aliases: messages | msg | m
Permission: appwrite.reload.messages
Config
Command to reload config
Usage: appwrite reload config
Aliases: config | c
Permission: appwrite.reload.config
Configs ⚙️ config.yml In the config.yml file, you can configure the connection to the Appwrite server.
❓ FAQ Where to use local and where remote variables? Local variables are those that don't save in the database. On the other hand, remote variables are those that are saved in the database. That means you can use local variables as much as you want, and they'll never be stored in the database. Fun fact: You can create a local variable and then just set it as remote and vice versa.
Types of variables You can use several variables types. Once you choose the type, you cannot change it - you must delete and then create in again to override the type.
Types:
INT - number without a decimal point
FLOAT - number with a decimal point
STRING - everything else (typically text)
Why do I need different types? For example, if you have to store money, you have to store it as INT or FLOAT, because later you will need to increase or decrease the value by a relative amount.