mirror of
https://github.com/Leahnaya/UBFunkeysServer.git
synced 2026-03-30 05:34:41 -05:00
Fixed NPE for Leaderboard loading
This commit is contained in:
parent
0c6b47098e
commit
2bf17634f2
|
|
@ -180,26 +180,30 @@ public class GalaxyPlugin {
|
|||
switch(category) {
|
||||
case 1:
|
||||
Node gameNodes = ArkOneParser.findParentNodeOfPath(profile.getChildNodes(), "profile/statistics/games");
|
||||
for (int i = 0; i < gameNodes.getChildNodes().getLength(); i++) {
|
||||
Element record = resp.createElement("record");
|
||||
if (gameNodes != null) {
|
||||
for (int i = 0; i < gameNodes.getChildNodes().getLength(); i++) {
|
||||
Element record = resp.createElement("record");
|
||||
|
||||
Element child = (Element)gameNodes.getChildNodes().item(i);
|
||||
record.setAttribute("id", child.getAttribute("id"));
|
||||
record.setAttribute("sp", child.getAttribute("count"));
|
||||
Element child = (Element) gameNodes.getChildNodes().item(i);
|
||||
record.setAttribute("id", child.getAttribute("id"));
|
||||
record.setAttribute("sp", child.getAttribute("count"));
|
||||
|
||||
recordsElement.appendChild(record);
|
||||
recordsElement.appendChild(record);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
Node itemNodes = ArkOneParser.findParentNodeOfPath(profile.getChildNodes(), "profile/menu/items");
|
||||
for (int i = 0; i < itemNodes.getChildNodes().getLength(); i++) {
|
||||
Element record = resp.createElement("record");
|
||||
if (itemNodes != null) {
|
||||
for (int i = 0; i < itemNodes.getChildNodes().getLength(); i++) {
|
||||
Element record = resp.createElement("record");
|
||||
|
||||
Element child = (Element)itemNodes.getChildNodes().item(i);
|
||||
record.setAttribute("id", child.getAttribute("id"));
|
||||
record.setAttribute("c", child.getAttribute("total"));
|
||||
Element child = (Element) itemNodes.getChildNodes().item(i);
|
||||
record.setAttribute("id", child.getAttribute("id"));
|
||||
record.setAttribute("c", child.getAttribute("total"));
|
||||
|
||||
recordsElement.appendChild(record);
|
||||
recordsElement.appendChild(record);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user