Skip to content

Commit

Permalink
Hide entity deserialization errors unless using development branch (f…
Browse files Browse the repository at this point in the history
…ixes #552)
  • Loading branch information
Intelli committed Jun 18, 2024
1 parent 3d32320 commit 957bf70
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.bukkit.util.io.BukkitObjectInputStream;
import org.bukkit.util.io.BukkitObjectOutputStream;

import net.coreprotect.config.ConfigHandler;
import net.coreprotect.database.Database;

public class EntityStatement {
Expand Down Expand Up @@ -64,8 +65,10 @@ public static List<Object> getData(Statement statement, BlockState block, String

resultSet.close();
}
catch (Exception e) {
e.printStackTrace();
catch (Exception e) { // only display this exception on development branch
if (!ConfigHandler.EDITION_BRANCH.contains("-dev")) {
e.printStackTrace();
}
}

return result;
Expand Down

0 comments on commit 957bf70

Please sign in to comment.