Skip to content

Commit

Permalink
Check for empty block array
Browse files Browse the repository at this point in the history
  • Loading branch information
SS111 committed Jul 9, 2013
1 parent bf745e5 commit f06c133
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/com/github/ss111/ConflictHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,21 @@ public static String getConflictString(MultiValueMap map, Integer key) {

public static ArrayList<Integer> getConflictingBlocks() {

if (conflictingBlocks.size() == 0) {

JOptionPane.showMessageDialog(null, "There are no unused block IDs! Did you forget to dump them? The program cannot continue and will now close.", "Information", JOptionPane.ERROR_MESSAGE);

WindowMain.frmMain.dispose();
}

return conflictingBlocks;
}

public static ArrayList<Integer> getConflictingItems() {

if (conflictingItems.size() == 0) {

JOptionPane.showMessageDialog(null, "There are no unused item IDs! Did you forget to dump them? The program cannot continue and will now close", "Information", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, "There are no unused item IDs! Did you forget to dump them? The program cannot continue and will now close.", "Information", JOptionPane.ERROR_MESSAGE);

WindowMain.frmMain.dispose();
}
Expand Down

0 comments on commit f06c133

Please sign in to comment.