OtSpawners: Data, MySQL and updating

Where OtSpawners stores its data, how to use MySQL and how to update or remove the plugin.

On this page

Files

File Content
plugins/OtSpawners/config.yml Settings
plugins/OtSpawners/mobs.yml Spawner types and their loot
plugins/OtSpawners/prices.yml Sell prices
plugins/OtSpawners/messages.yml All texts
plugins/OtSpawners/otspawners.db The SQLite database, used when storage.type is sqlite

The table otspawners_spawners has one row per placed spawner: the server, world, position, type, stack, loot, XP and owner. Placing, stacking, breaking, collecting and selling are saved right away. New loot is saved every storage.sync-interval-seconds, 10 by default, and when the server stops.

OtSpawners does not send data to any outside service.

Using MySQL or MariaDB

  1. Create an empty database and a user for it.
  2. In plugins/OtSpawners/config.yml, set:
storage:
  type: mysql
  server-id: survival
  mysql:
    host: localhost
    port: 3306
    database: minecraft
    username: root
    password: ''
  1. Restart the server. OtSpawners creates its table.

Spawners are blocks in a world, so every server keeps its own. Several servers can use one database when each of them has its own server-id.

Important

Never give two servers with the same database the same server-id. They would see each other's spawners, and remove the ones that are not in their own world.

Placed spawners do not move along when you switch between SQLite and MySQL. Choose one before players start placing spawners.

Updating

  1. Stop the server.
  2. Replace the old jar in plugins with the new OtSpawners-<version>.jar.
  3. Start the server.

Your files and the database are kept. A setting that is missing from config.yml uses its default value, and a text that is missing from messages.yml uses the built-in text.

Moving or resetting a world

Spawners are stored by world name and position. When a world is reset, OtSpawners removes the spawners that are no longer there as soon as their chunk is loaded. When you rename a world, the spawners in it lose their data.

Removing

  1. Stop the server.
  2. Delete the jar from plugins.
  3. Delete plugins/OtSpawners when you no longer need the data.

The blocks stay in the world and become normal Minecraft spawners of their mob, one per block.

Last updated

Still stuck? Open a ticket on the help page or ask in Discord. Mention your version and what you tried.