diff --git a/src/main/java/com/cleanroommc/groovyscript/sandbox/CustomGroovyScriptEngine.java b/src/main/java/com/cleanroommc/groovyscript/sandbox/CustomGroovyScriptEngine.java index 8d1e6c4fe..e5a6951fb 100644 --- a/src/main/java/com/cleanroommc/groovyscript/sandbox/CustomGroovyScriptEngine.java +++ b/src/main/java/com/cleanroommc/groovyscript/sandbox/CustomGroovyScriptEngine.java @@ -171,7 +171,7 @@ public boolean deleteScriptCache() { this.loadedClasses.clear(); getClassLoader().clearCache(); try { - FileUtils.cleanDirectory(this.cacheRoot); + if (this.cacheRoot.exists()) FileUtils.cleanDirectory(this.cacheRoot); return true; } catch (IOException e) { GroovyScript.LOGGER.throwing(e);