Now, both absolute and relative paths are supported. Added license headers
parent
0b68c2efee
commit
663fba57de
|
@ -1,14 +1,14 @@
|
|||
# Done to increase the memory available to gradle.
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
|
||||
minecraft_version=20w06a
|
||||
yarn_mappings=20w06a+build.15
|
||||
minecraft_version=1.15.2
|
||||
yarn_mappings=1.15.2+build.14
|
||||
loader_version=0.7.8+build.184
|
||||
|
||||
#Fabric api
|
||||
fabric_version=0.4.32+build.296-1.16
|
||||
fabric_version=0.4.32+build.292-1.15
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0.2-20w06a
|
||||
mod_version = 1.0.3-1.15
|
||||
maven_group = net.szum123321
|
||||
archives_base_name = textile_backup
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
A simple backup mod for Fabric
|
||||
Copyright (C) 2020 Szum123321
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup;
|
||||
|
||||
import blue.endless.jankson.Comment;
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
A simple backup mod for Fabric
|
||||
Copyright (C) 2020 Szum123321
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup;
|
||||
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
`A simple backup mod for Fabric
|
||||
Copyright (C) 2020 Szum123321
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup.commands;
|
||||
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
A simple backup mod for Fabric
|
||||
Copyright (C) 2020 Szum123321
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup.commands;
|
||||
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
A simple backup mod for Fabric
|
||||
Copyright (C) 2020 Szum123321
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup.core;
|
||||
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
@ -14,6 +32,14 @@ import java.util.Arrays;
|
|||
|
||||
public class BackupHelper {
|
||||
public static File getBackupRootPath(){
|
||||
File path = new File(TextileBackup.config.path);
|
||||
|
||||
if(!path.exists()){
|
||||
try{
|
||||
path.mkdirs();
|
||||
}catch(Exception e){
|
||||
TextileBackup.logger.error(e.getMessage());
|
||||
|
||||
return FabricLoader
|
||||
.getInstance()
|
||||
.getGameDirectory()
|
||||
|
@ -21,6 +47,10 @@ public class BackupHelper {
|
|||
.resolve(TextileBackup.config.path)
|
||||
.toFile();
|
||||
}
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
public static void log(String s, ServerCommandSource ctx){
|
||||
if(ctx != null)
|
||||
|
@ -94,7 +124,8 @@ public class BackupHelper {
|
|||
Arrays.sort(file);
|
||||
|
||||
for(int i = 0; i < var1; i++){
|
||||
file[i].deleteOnExit();
|
||||
file[i].delete();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
A simple backup mod for Fabric
|
||||
Copyright (C) 2020 Szum123321
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup.core;
|
||||
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
/*
|
||||
A simple backup mod for Fabric
|
||||
Copyright (C) 2020 Szum123321
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup.core;
|
||||
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
import net.szum123321.textile_backup.TextileBackup;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
|
|
@ -1,7 +1,23 @@
|
|||
/*
|
||||
A simple backup mod for Fabric
|
||||
Copyright (C) 2020 Szum123321
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.szum123321.textile_backup.mixin;
|
||||
|
||||
import net.fabricmc.fabric.impl.tag.extension.FabricTagHooks;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.PlayerManager;
|
||||
import net.szum123321.textile_backup.TextileBackup;
|
||||
|
|
|
@ -29,6 +29,6 @@
|
|||
"depends": {
|
||||
"fabricloader": ">=0.7.2",
|
||||
"fabric": "*",
|
||||
"minecraft": "1.16.*"
|
||||
"minecraft": "1.15"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue