- Note: This page is for developers, server administrators should read Bukkit.yml#database
Bukkit API[edit | edit source]
Bukkit provides an ORM layer for accessing a database. Craftbukkit servers have a database defined in their bukkit.yml. A plugin may access the defined database if the database attribute is set to true in plugin.yml. Plugins can access the database through the Avaje Ebeans ORM by calling JavaPlugin.getDatabase().
- For more information about Avaje Ebeans see the Avaje Ebeans Documentation
Example[edit | edit source]
For an example using Ebeans ORM,
Information[edit | edit source]
Plugins that use a MySQL database use it because it is more powerful than flat-file databases. Using MySQL increases chances of server crashes unless the database is hosted externally. Your server(s) can crash from reaching maximum HDD space allocated to your server.
Note[edit | edit source]
- Note: Plugins are not restricted to communicating with databases through the provided ORM
- Note: Plugins seeking direct connections with a database may do so using the Standard Java Library or other libraries.