From 58378dd90046335df1014b81108b3104a74b065f Mon Sep 17 00:00:00 2001 From: xaver106 Date: Thu, 2 Jun 2022 12:32:17 +0200 Subject: [PATCH] refactor: replace try with if statements --- .../com/plotsquared/core/command/DebugPaste.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java b/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java index c3d345465..60b78042a 100644 --- a/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java @@ -178,6 +178,20 @@ public class DebugPaste extends SubCommand { "lang" ); + if (langDir.exists()) { + File[] fileList = langDir.listFiles(); + if (fileList != null) { + for (File current : fileList) { + if (current == null || current.exists()) { + continue; + } + if (current.getName().startsWith("messages_") && current.getName().endsWith(".json")) { + incendoPaster.addFile(current); + } + } + } + } + try { for (File current : langDir.listFiles()) { try {