Installation - PlayerNguyen/OptEcoPrime GitHub Wiki

Requirements

Before all, please ensure that your server environment (device) contains all these requirements as follows:

  • Java Runtime 8 or higher
  • Bukkit core (Bukkit, Spigot, Papermc ....) with version neither 1.8 or higher.
  • A database server (optional)

Installation

Installing OptEcoPrime is really easy and fast, you just need to download the newest version (or version that is compatible with your Bukkit server). After downloaded, put it into your /plugins folder, and then start your server. Boom, it is done.

Basically, OptEcoPrime using SQLite to store users, transactions,... data. You do not need to set up anything. By default, your storage file located in /plugins/OptEcoPrime/data.sqlite. In order to change your file name, you can visit /plugins/Settings/Config.yml and edit this section:

Database:
  SQLite: 
    # A SQLite file name that contains data
    FileName: data.sqlite

Databases

OptEcoPrime provides lots of things for you to persistently store your data via a database system. Currently, when you start your server by default, your data from OptEcoPrime are containing in SQLite, one of the most popular database systems without setup many things. However, we are supporting many database systems. Let's take a look ahead for the supported database list (click to see how to set it up).

  • MySQL
  • MongoDB

Set up with MySQL

  • Step 1 (Ignorable): Before setup. Ensure that you have installed MySQL server in your environment. You must create a new database by executing this query
CREATE DATABASE `optecoprime`;
  • Step 2: To set up locally, open /plugins/OptEcoPrime/Settings/Config.yml and change those lines to
Database: 
  # A type of database system that plugin use
  DatabaseType: MySQL
  MySQl: 
    # A host address for OptEcoPrime to connect to database
    Host: localhost
    # A port from database for OptEcoPrime to connect to database
    Port: 3306
    # Credential username, to connect to MySQL server
    Username: <username>
    # Credential password, to connect to MySQL server
    Password: <password>
    # A database, you must create a database before using
    Database: optecoprime
    # An option as url parameter to config your database connection.
    Options: useSSL=false

Which username and password is your credential. You can also change your host and port for a cross-server connection. If you have a different database (not using step 1), you will need to change your Database name as the same as current your database name.

Once you are done, start your server and enjoy. Whether you need any support, create a new issues ticket right away.

Set up with MongoDB

I admit that MongoDB is very crazy, and wonderful too. Thus OptEcoPrime decides to support MongoDB with a few setups.

Enabling your MongoDB server and set your Settings.yml section to DatabaseType: mongodb. Then, start your server. Whether you have any authentication, visit the MongoDB section.

With a few configurations in a section as follow, you can definitely connect to MongoDB. Whether your MongoDB server has a credential, try to change the URI to this schema.

MongoDB: 
  # A mongodb server uri to connect to database
  URI: mongodb://localhost:27017/
  # A mongodb server database name
  Database: optecoprime
  Collection: 
    # A name of users collection
    User: users
⚠️ **GitHub.com Fallback** ⚠️