diff --git a/update-Nitrov3.sh b/update-Nitrov3.sh index c3a21ef..8f2df57 100755 --- a/update-Nitrov3.sh +++ b/update-Nitrov3.sh @@ -187,6 +187,10 @@ fi echo "--> Cleaning Yarn cache..." yarn cache clean 2>/dev/null || true +# 4. Remove old .jar files, keeping only the newest one +echo "--> Cleaning up old emulator .jar files (keeping the latest)..." +ls -t "$EMULATOR_DIR/Emulator/target"/Habbo-*-jar-with-dependencies.jar 2>/dev/null | tail -n +2 | xargs -r rm -f || true + # ---------------------------------------- # 6. Fix Permissions (www-data)