Skip to content

Commit 76d4de9

Browse files
committed
Added else statements for the checkers
1 parent 8f237ff commit 76d4de9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/main/java/tech/nully/PluginInstaller/PluginList.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,20 @@ public static void SendPG2ToSender(CommandSender sender) {
2828
for (int i = 15; i < 22; i++) {
2929
String Col1 = "";
3030
String Col2 = "";
31+
32+
// Null checkers for elements in the Array
3133
if (AlphaPluginList[i-1] != null) {
3234
Col1 = AlphaPluginList[i-1];
35+
} else {
36+
Col1 = "N/A";
3337
}
3438
if (AlphaPluginList[SecondCollumn-1] != null) {
3539
Col2 = AlphaPluginList[SecondCollumn-1];
40+
} else {
41+
Col2 = "N/A";
3642
}
43+
// _________________________________________
44+
3745
sender.sendMessage(i+". "+ Col1 + "" + SecondCollumn + ". " + Col2);
3846
SecondCollumn++;
3947
}

0 commit comments

Comments
 (0)