Skip to content

Commit

Permalink
Minor change to help with debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Apr 20, 2024
1 parent bc383fe commit cb3caac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -24,9 +24,9 @@ protected ChunkSnapshot getChunkObject(int x, int z) {
// TODO: pre-load multiple chunks on cache miss
Callable<ChunkSnapshot> call = () -> world.getChunkAt(x, z).getChunkSnapshot(false, false, false);
try {
if (!Bukkit.isPrimaryThread())
if (!Bukkit.isPrimaryThread()) {
return Bukkit.getScheduler().callSyncMethod(null, call).get();
else
} else
return call.call();
} catch (Exception e) {
e.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/net/citizensnpcs/api/util/Translator.java
Expand Up @@ -94,6 +94,7 @@ private static Map<String, String> getBaseTranslations() {
StandardCharsets.UTF_8)) {
return (JSONObject) jp.parse(in);
} catch (ParseException | IOException e) {
e.printStackTrace();
return null;
}
}
Expand Down

0 comments on commit cb3caac

Please sign in to comment.