mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 11:13:45 +01:00 
			
		
		
		
	Possible fix...
This commit is contained in:
		@@ -184,6 +184,13 @@ public class PlotMain extends JavaPlugin {
 | 
			
		||||
     */
 | 
			
		||||
    private static LinkedHashMap<String, HashMap<PlotId, Plot>> plots;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Return an instance of MySQL
 | 
			
		||||
     */
 | 
			
		||||
    public static MySQL getMySQL() {
 | 
			
		||||
        return mySQL;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * Check for expired plots
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -53,7 +53,7 @@ public class SQLManager implements AbstractDB {
 | 
			
		||||
    public final String CREATE_HELPERS;
 | 
			
		||||
    public final String CREATE_PLOT;
 | 
			
		||||
    // Private Final
 | 
			
		||||
    private final Connection connection;
 | 
			
		||||
    private Connection connection;
 | 
			
		||||
    private final String prefix;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -81,6 +81,19 @@ public class SQLManager implements AbstractDB {
 | 
			
		||||
                "INSERT INTO `" + prefix + "plot_helpers` (`plot_plot_id`, `user_uuid`) values ";
 | 
			
		||||
        CREATE_PLOT =
 | 
			
		||||
                "INSERT INTO `" + prefix + "plot`(`plot_id_x`, `plot_id_z`, `owner`, `world`) VALUES(?, ?, ?, ?)";
 | 
			
		||||
        
 | 
			
		||||
        //schedule reconnect
 | 
			
		||||
        Bukkit.getScheduler().scheduleSyncRepeatingTask(PlotMain.getMain(), new Runnable(){
 | 
			
		||||
            public void run(){
 | 
			
		||||
                try {
 | 
			
		||||
                    connection = PlotMain.getMySQL().openConnection();
 | 
			
		||||
                }
 | 
			
		||||
                catch (Exception e) {
 | 
			
		||||
                    e.printStackTrace();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }, 500000, 500000);
 | 
			
		||||
        
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setTimout() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user