Autoselect first tab when no tab is selected.

This commit is contained in:
raoulvdberge
2018-07-02 14:06:07 +02:00
parent 7ea20314b2
commit 3db7d8d029

View File

@@ -208,9 +208,13 @@ public class GuiCraftingMonitor extends GuiBase implements IResizableDisplay {
return getTabById(currentTab.get());
}
if (tasks.isEmpty()) {
return null;
}
return tasks.get(0);
}
@Nullable
private IGridTab getTabById(UUID id) {
return tasks.stream().filter(t -> ((CraftingMonitorTask) t).id.equals(id)).findFirst().orElse(null);