![[IMG]](/proxy/image?url=https%3A%2F%2Fi.imgur.com%2Fzzu5Fk6.png)
Support: @fluid_dev on discord
Prerequisites:
- A running Minecraft server with StrikePractice plugin installed.
- MySQL database service operational on your server or hosting.
- Access to your server files via FTP or a file manager provided by your hosting service.
Step 1: Enable MySQL in StrikePractice Before proceeding with the statistics addon setup, ensure that MySQL is enabled within the StrikePractice plugin:
- Navigate to the plugins/StrikePractice/ directory on your server.
- Open the config.yml file with a text editor.
- Locate the section for MySQL settings and change the mysql: option to true.
- Fill in your MySQL database credentials (host, port, username, password, database) in the respective fields.
Step 2: Install the Statistics Addon
- Download the StrikePractice Website Statistics Addon from the official repository or marketplace.
- Upload the addon to your server's plugins/ directory.
- Restart the server to load the addon.
Step 3: Configure the Statistics Addon
- After the server restarts, the addon will generate its own config.yml file in its directory.
- Open the config.yml file for the Statistics Addon.
- Copy the MySQL credentials from the StrikePractice config.yml to the addon's config.yml to ensure they match.
Step 4: Secure config.yml
To secure the config.yml file of your Statistics Addon:
Access your server's file system and navigate to the directory containing config.yml.
If you're using Apache, create a .htaccess file in the same directory and add the following lines:
Code (Text):
<Files "config.php">
Order Allow,Deny
Deny from all
</Files>
If you're on an Nginx server, add the following to your server configuration:
Code (Text):
location ~* /path/to/your/config\.yml$ {
deny all;
return 404;
}
</Files>
Replace /path/to/your/ with the actual path to the config.yml file.
Step 5: Verify Installation
- Once the config.yml is set up and secured, navigate to your website and access the statistics page.
- Verify that the statistics are being correctly displayed and that there are no error messages