001/* 002 * PlotSquared, a land and world management plugin for Minecraft. 003 * Copyright (C) IntellectualSites <https://intellectualsites.com> 004 * Copyright (C) IntellectualSites team and contributors 005 * 006 * This program is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * This program is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU General Public License for more details. 015 * 016 * You should have received a copy of the GNU General Public License 017 * along with this program. If not, see <https://www.gnu.org/licenses/>. 018 */ 019package com.plotsquared.core.configuration; 020 021import java.io.File; 022import java.util.ArrayList; 023import java.util.Collections; 024import java.util.List; 025 026public class Storage extends Config { 027 028 public static String PREFIX = ""; 029 030 public static void save(File file) { 031 save(file, Storage.class); 032 } 033 034 public static void load(File file) { 035 load(file, Storage.class); 036 } 037 038 @Comment("MySQL section") 039 public static final class MySQL { 040 041 @Comment("Should MySQL be used?") 042 public static boolean USE = false; 043 public static String HOST = "localhost"; 044 public static String PORT = "3306"; 045 public static String USER = "root"; 046 public static String PASSWORD = "password"; 047 public static String DATABASE = "plot_db"; 048 049 @Comment("Set additional properties: https://goo.gl/wngtN8") 050 public static List<String> 051 PROPERTIES = new ArrayList<>(Collections.singletonList("useSSL=false")); 052 053 } 054 055 056 @Comment("SQLite section") 057 public static final class SQLite { 058 059 @Comment("Should SQLite be used?") 060 public static boolean USE = true; 061 @Comment("The file to use") 062 public static String DB = "storage"; 063 064 } 065 066}