Skip to content

Commit

Permalink
Fix combined if
Browse files Browse the repository at this point in the history
  • Loading branch information
TenkyuChimata committed Dec 24, 2023
1 parent 16c67f4 commit 4522fab
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/main/java/jp/wolfx/mceew/MCEEW.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,20 +266,18 @@ private static void jmaEqlistExecute(Boolean jmaBoolean) {
String shindo = jmaEqlistData.get("No1").getAsJsonObject().get("shindo").getAsString();
String info = jmaEqlistData.get("No1").getAsJsonObject().get("info").getAsString();
String origin_time = getDate("yyyy/MM/dd HH:mm:ss", time_format, "Asia/Tokyo", time_str);
if (jma_md5 != null) {
if (jmaBoolean) {
Bukkit.broadcastMessage(
jma_broadcast_message.
replaceAll("%origin_time%", origin_time).
replaceAll("%region%", region).
replaceAll("%mag%", mag).
replaceAll("%depth%", depth).
replaceAll("%lat%", latitude).
replaceAll("%lon%", longitude).
replaceAll("%shindo%", getShindoColor(shindo)).
replaceAll("%info%", info)
);
}
if (jma_md5 != null && jmaBoolean) {
Bukkit.broadcastMessage(
jma_broadcast_message.
replaceAll("%origin_time%", origin_time).
replaceAll("%region%", region).
replaceAll("%mag%", mag).
replaceAll("%depth%", depth).
replaceAll("%lat%", latitude).
replaceAll("%lon%", longitude).
replaceAll("%shindo%", getShindoColor(shindo)).
replaceAll("%info%", info)
);
}
jma_md5 = jmaEqlistData.get("md5").getAsString();
jma_info.clear();
Expand Down

0 comments on commit 4522fab

Please sign in to comment.