aboutsummaryrefslogtreecommitdiff
path: root/features/globalSettings/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'features/globalSettings/index.js')
-rw-r--r--features/globalSettings/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js
index 11d8d9a..89adc5c 100644
--- a/features/globalSettings/index.js
+++ b/features/globalSettings/index.js
@@ -82,10 +82,10 @@ class GlobalSettings extends Feature {
this.lastCookies = 0
this.registerEvent("postGuiRender", () => {
- if (Player.getContainer().getName() === "Cookie Clicker v0.01" && Player.getContainer().getStackInSlot(13)) this.renderCookie()
+ if (Player.getContainer() && Player.getContainer().getName() === "Cookie Clicker v0.01" && Player.getContainer().getStackInSlot(13)) this.renderCookie()
})
this.registerStep(false, 1, () => {
- if (Player.getContainer().getName() === "Cookie Clicker v0.01" && Player.getContainer().getStackInSlot(13)) this.tickCookie()
+ if (Player.getContainer() && Player.getContainer().getName() === "Cookie Clicker v0.01" && Player.getContainer().getStackInSlot(13)) this.tickCookie()
})
this.registerEvent("guiMouseClick", this.guiClicked)