07-01-2015, 05:44 PM
(06-01-2015, 11:44 PM)Jalau link Wrote:So you want me to use methods to parse XML instead of just splitting the text?You don't have to, but you treat the xml as text instead of xml, which Java has a built in API to handle. You can translate it to an object model and read the elements. If you ever need more elements from the future out of the xml, this makes it more extensible too. JAXP gives some interfaces for this.
(06-01-2015, 11:44 PM)Jalau link Wrote:For the updateServerData part, I don't know exactly what you mean. Could you maybe explain that part again?Yeah that was unclear, sorry. I meant this block below. I think you can return the name of the selected frame and perform a string compare to the data.getName, rather than check every single combination for a mismatch.
Code:
+ if (data.getName().contains("EU") && !SettingsFrame.eu.isSelected())
+ return;
+
+ if (data.getName().contains("NA") && !SettingsFrame.na.isSelected())
+ return;
+
+ if (data.getName().contains("AU") && !SettingsFrame.au.isSelected())
+ return;
+
+ if (data.getName().contains("Normal") && !SettingsFrame.normal.isSelected())
+ return;
+
+ if (data.getName().contains("Hard") && !SettingsFrame.hard.isSelected())
+ return;
+
+ if (data.getName().contains("Ragnarok") && !SettingsFrame.ragnarok.isSelected())
+ return;
+
+ if (data.getName().contains("Event") && !SettingsFrame.other.isSelected())
+ return;
+
+ if (data.getName().contains("Cavalry") && !SettingsFrame.cavalry.isSelected())
+ return;
Voted Friendliest NordInvasion Player
Quote Board is on Discord (last updated 2025.07.24)
"When I feel bad, I read your quote board." - Corndog
Nka: You’re playing it smart, always [using] logic, and they get pissed.
Kaasovic: God, this guy is unbeatable. I feel defeated in every verbal argument we end up in. Good job, Sir.
Odi: Hasn’t [PCK beaten] the game at this point?
Quote Board is on Discord (last updated 2025.07.24)
"When I feel bad, I read your quote board." - Corndog
Nka: You’re playing it smart, always [using] logic, and they get pissed.
Kaasovic: God, this guy is unbeatable. I feel defeated in every verbal argument we end up in. Good job, Sir.
Odi: Hasn’t [PCK beaten] the game at this point?