mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-03 18:43:43 +01:00 
			
		
		
		
	Fix for zip backup running in SQL mode.
This commit is contained in:
		@@ -15,6 +15,7 @@ Version 1.3.07
 | 
				
			|||||||
 + Added permission nodes for Treasure & Magic Hunter for Fishing
 | 
					 + Added permission nodes for Treasure & Magic Hunter for Fishing
 | 
				
			||||||
 + Added config options for enabling/disabling specific double drops
 | 
					 + Added config options for enabling/disabling specific double drops
 | 
				
			||||||
 + Added automatic zip backup of flatfile database
 | 
					 + Added automatic zip backup of flatfile database
 | 
				
			||||||
 | 
					 = Fixed zip backup performing when running in SQL mode.
 | 
				
			||||||
 = Fixed bug where the permission node for Impact didn't work
 | 
					 = Fixed bug where the permission node for Impact didn't work
 | 
				
			||||||
 = Fixed some bypass nodes defaulting true for Ops
 | 
					 = Fixed some bypass nodes defaulting true for Ops
 | 
				
			||||||
 ! Changed Mining to ignore blocks when the pick is enchanted with Silk Touch
 | 
					 ! Changed Mining to ignore blocks when the pick is enchanted with Silk Touch
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,6 +13,7 @@ import java.util.zip.ZipEntry;
 | 
				
			|||||||
import java.util.zip.ZipOutputStream;
 | 
					import java.util.zip.ZipOutputStream;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.gmail.nossr50.mcMMO;
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
 | 
					import com.gmail.nossr50.config.Config;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class ZipLibrary {
 | 
					public class ZipLibrary {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -24,13 +25,20 @@ public class ZipLibrary {
 | 
				
			|||||||
    private static File Leaderboards = new File(mcMMO.leaderboardDirectory);
 | 
					    private static File Leaderboards = new File(mcMMO.leaderboardDirectory);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static void mcMMObackup() throws IOException {
 | 
					    public static void mcMMObackup() throws IOException {
 | 
				
			||||||
        if (BackupDir.mkdir()) {
 | 
					    	
 | 
				
			||||||
            try {
 | 
					    	if (Config.getInstance().getUseMySQL()) {
 | 
				
			||||||
 | 
					    		System.out.println("No Backup performed, in SQL Mode.");
 | 
				
			||||||
 | 
					    		return;
 | 
				
			||||||
 | 
					    	}
 | 
				
			||||||
 | 
					    	
 | 
				
			||||||
 | 
					    	try {
 | 
				
			||||||
 | 
					    	if (BackupDir.mkdir()) {
 | 
				
			||||||
                mcMMO.p.getLogger().info("Created Backup Directory.");
 | 
					                mcMMO.p.getLogger().info("Created Backup Directory.");
 | 
				
			||||||
 | 
					    	}
 | 
				
			||||||
            } catch (Exception e) {
 | 
					            } catch (Exception e) {
 | 
				
			||||||
                mcMMO.p.getLogger().severe(e.toString());
 | 
					                mcMMO.p.getLogger().severe(e.toString());
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Generate the proper date for the backup filename
 | 
					        //Generate the proper date for the backup filename
 | 
				
			||||||
        Date date = new Date();
 | 
					        Date date = new Date();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user