Skip to content

Commit

Permalink
fix: can show stats panel when 0 party pokemon
Browse files Browse the repository at this point in the history
  • Loading branch information
babyw1nter committed Jul 17, 2021
1 parent 6afec48 commit 445d58c
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,13 @@ public boolean doesGuiPauseGame() {
*/
public static void open() {
EntityPlayer player = Minecraft.getMinecraft().player;
player.openGui(PixelmonInfoPlus.instance, StatsPanelGuiHandler.GUI_ID, player.getEntityWorld(), 0, 0, 0);
StatsPanelGuiContainer.isOpen = true;
// 尝试更新缓存
PartyCache.updateCache(false);

if (SlotApi.getTeam().size() > 0) {
player.openGui(PixelmonInfoPlus.instance, StatsPanelGuiHandler.GUI_ID, player.getEntityWorld(), 0, 0, 0);
StatsPanelGuiContainer.isOpen = true;
// 尝试更新缓存
PartyCache.updateCache(false);
}
}

/**
Expand Down

0 comments on commit 445d58c

Please sign in to comment.