· 8 years ago · Jun 19, 2018, 10:14 AM
1# Databases to store variables in. These can either be used as a simple one-server-storage
2 # where variables are written constantly but only read at server start,
3 # or as a connection between multiple servers by monitoring the database(s) for changes.
4 #
5 # You can define as many databases as you want, just make sure to choose a distinct name for each one, and don't forget to set all options correctly.
6 #
7 # To be able to use a database you'll need to download the plugin 'SQLibrary' from http://dev.bukkit.org/server-mods/sqlibrary/files/
8 # and install it in your server's plugin directory like other plugins.
9 #
10 # Please note that '/skript reload' will not reload this section, i.e. you'll have to restart Skript for changes to take effect.
11
12 # Each database definition must be in a separate section. You can choose any name for the sections, as long as it's not already used.
13 database 1:
14 # an example database to describe all possible options.
15
16 type: disabled
17 # The type of this database. Allowed values are 'CSV', 'SQLite', 'MySQL' and 'disabled'.
18 # CSV uses a text file to store the variables, while SQLite and MySQL use databases, and 'disabled' makes Skript ignore the database as if it wasn't defined at all.
19
20 pattern: .*
21 # Defines which variables to save in this database.
22 # This pattern uses Regex syntax, e.g. use 'db_.*' (without the quotes) to store all variables prefixed with 'db_' in this database,
23 # or use '.*' (the default value) to store all variables here (recommended for the last database in this list, as otherwise some variables might not be saved).
24 # Please note that variables are only stored in one database, and databases are checked from top to bottom,
25 # e.g. if a variable matches the topmost database's pattern it will be saved there and nowhere else.
26 # BTW: Patterns are checked in a separate thread, i.e. your server likely won't run slower when using complicated patterns.
27
28 monitor changes: false
29 monitor interval: 20 seconds
30 # If 'monitor changes' is set to true, variables will repeatedly be checked for updates in the database (in intervals set in 'monitor interval').
31 # ! Please note that you should set 'pattern', 'monitor changes' and 'monitor interval' to the same values on all servers that access the same database!
32
33 # == MySQL configuration ==
34 host: localhost # Where the database server is located at, e.g. 'example.com', 'localhost', or '192.168.1.100'
35 port: 3306 # 3306 is MySQL's default port, i.e. you likely won't need to change this value
36 user: root
37 password: pass
38 database: skript # The database to use. Skript will automatically create a table 'variables21' in this database if it doesn't exist
39 # (If the table exists but is defined differently that how Skript expects it to be you'll get errors and no variables will be saved and/or loaded)
40
41 # == SQLite/CSV configuration ==
42 file: ./plugins/Skript/variables.db
43 # Where to save the variables to. For a CSV file, the file extension '.csv' is recommended, but not required, but SQLite database files must end in '.db' (SQLibrary forces this).
44 # The file path can either be absolute (e.g. 'C:\whatever\...' [Windows] or '/usr/whatever/...' [Unix]), or relative to the server directory (e.g. './plugins/Skript/...').
45
46 backup interval: 2 hours
47 # Creates a backup of the file every so often. This can be useful if you ever want to revert variables to an older state.
48 # Variables are saved constantly no matter what is set here, thus a server crash will never make you loose any variables.
49 # Set this to 0 to disable this feature.
50
51
52 MySQL example:
53 # A MySQL database example, with options unrelated to MySQL removed.
54
55 type: disabled # change to line below to enable this database
56 # type: MySQL
57
58 pattern: synced_.* # this pattern will save all variables that start with 'synced_' in this MySQL database.
59
60 host: localhost
61 port: 3306
62 user: root
63 password: pass
64 database: skript
65
66 monitor changes: true
67 monitor interval: 20 seconds
68
69 SQLite example:
70 # An SQLite database example.
71
72 type: disabled # change to line below to enable this database
73 # type: SQLite
74
75 pattern: db_.* # this pattern will save all variables that start with 'db_' in this SQLite database.
76
77 file: ./plugins/Skript/variables.db
78 # SQLite databases must end in '.db'
79
80 backup interval: 0 # 0 = don't create backups
81 monitor changes: false
82 monitor interval: 20 seconds
83
84 default:
85 # The default "database" is a simple text file, with each variable on a separate line and the variable's name, type, and value separated by commas.
86 # This is the last database in this list to catch all variables that have not been saved anywhere else.
87 # You can modify this database freely, but make sure to know what you're doing if you don't want to loose any variables.
88
89 type: CSV
90
91 pattern: .*
92
93 file: ./plugins/Skript/variables.csv
94
95 backup interval: 2 hours
96
97 # PS: If you don't want some variables to be saved in any database (e.g. variables that contain an %entity% which usually despawn when the server is shut down)
98 # you can modify the last database's pattern to not match all variables, e.g. use '(?!x_).*' to match all variables that don't start with 'x_'.
99 # Be very cautious when doing this however as unsaved variables cannot be recovered after the server has been stopped.
100 # I recommend to use a single character to denote unsaved variables (similar to local variables' '_'), e.g. '-', in which case the last database's pattern should be '(?!-).*'.
101
102
103
104# ==== Settings that should not be changed ====
105
106version: 2.1.2
107# DO NOT CHANGE THIS VALUE MANUALLY!
108# This saves for which version of Skript this configuration was written for.
109# If it does not match the version of the .jar file then the config will be updated automatically.