Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- REM Enable delayed expansion
- setlocal enabledelayedexpansion
- if "%~1"=="" (
- echo No directory path provided.
- exit /b 1
- )
- set "dirPath=%~1"
- set query="InhabitedTime < \"5 minutes\""
- echo Running query on path %dirPath% ...
- mcaselector.jar --mode delete --world "%dirPath%" --query %query%
- echo Running query for Nether ...
- mcaselector.jar --mode delete --world "%dirPath%\DIM-1" --query %query%
- echo Running query for End ...
- mcaselector.jar --mode delete --world "%dirPath%\DIM1" --query %query%
- REM Check if the dimensions directory exists
- if not exist "%dirPath%\dimensions" (
- echo The dimensions directory does not exist.
- exit /b 1
- )
- REM Loop through each subdirectory in the dimensions directory
- for /d %%d in ("%dirPath%\dimensions\*") do (
- REM Loop through each subdirectory within %%d
- for /d %%x in ("%%d\*") do (
- REM Check if the region subdirectory exists within %%x
- if exist "%%x\region" (
- echo Running query for %%x ...
- mcaselector.jar --mode delete --world "%%x" --query %query%
- )
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement