From 30e6cde8110b75dada8e6c3c01456245ab990011 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Thu, 20 Jan 2022 17:30:44 +0800 Subject: fix ct 2.0 issues with museum gui (soopyv2 will probs no longer work on ct 1.3) --- features/betterGuis/museumGui.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'features/betterGuis') diff --git a/features/betterGuis/museumGui.js b/features/betterGuis/museumGui.js index f652cf3..d2756da 100644 --- a/features/betterGuis/museumGui.js +++ b/features/betterGuis/museumGui.js @@ -436,11 +436,11 @@ class MuseumGui { if(!this.searchText){ if(currPage > 1){ this.previousButton.visable = true - if(Player.getOpenedInventory().getStackInSlot(45).getID() !== -1) this.previousButton.setLore(Player.getOpenedInventory().getStackInSlot(45).getLore()) + if(Player.getOpenedInventory().getStackInSlot(45)) this.previousButton.setLore(Player.getOpenedInventory().getStackInSlot(45).getLore()) } if(currPage < pageNum){ this.nextButton.visable = true - if(Player.getOpenedInventory().getStackInSlot(53).getID() !== -1)this.nextButton.setLore(Player.getOpenedInventory().getStackInSlot(53).getLore()) + if(Player.getOpenedInventory().getStackInSlot(53))this.nextButton.setLore(Player.getOpenedInventory().getStackInSlot(53).getLore()) } } @@ -549,7 +549,7 @@ class MuseumGui { this.itemsBox.addChild(itemBox) } - if(Player.getOpenedInventory().getStackInSlot(24).getID() !== -1 && Player.getOpenedInventory().getStackInSlot(20).getID() !== -1){ + if(Player.getOpenedInventory().getStackInSlot(24) && Player.getOpenedInventory().getStackInSlot(20)){ let cancelButton = new ButtonWithArrow().setText("§cCancel").setLocation(0.1,0.4,0.35,0.2).setDirectionRight(false).setLore(Player.getOpenedInventory().getStackInSlot(24).getLore()) cancelButton.addEvent(new SoopyMouseClickEvent().setHandler(()=>{ -- cgit