aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMy-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com>2020-12-05 21:15:31 -0500
committerMy-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com>2020-12-05 21:15:31 -0500
commitc8c49fa551a4c5867a43d4b13aa4d5d78dfe87dd (patch)
tree8e2efd9d109cbf0f78ba5a5b4dbad8c67fc390e4 /src
parentac5ff849332ab6817dabb06bfc7c511f3442b9f6 (diff)
downloadSkyblockMod-c8c49fa551a4c5867a43d4b13aa4d5d78dfe87dd.tar.gz
SkyblockMod-c8c49fa551a4c5867a43d4b13aa4d5d78dfe87dd.tar.bz2
SkyblockMod-c8c49fa551a4c5867a43d4b13aa4d5d78dfe87dd.zip
Fix out of bound exception
Added size check for pattern
Diffstat (limited to 'src')
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index 620f6dc..174581d 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -2880,7 +2880,7 @@ public class DankersSkyblockMod
if (ToggleCommand.chronomatronToggled && inventoryName.startsWith("Chronomatron (")) {
if (inventory.getStackInSlot(49).getDisplayName().startsWith("§7Timer: §a") && (item == null || item.getItem() == Item.getItemFromBlock(Blocks.stained_glass) || item.getItem() == Item.getItemFromBlock(Blocks.stained_hardened_clay))) {
- if(!item.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) {
+ if(chronomatronPattern.size() > 0 && !item.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) {
if(event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && !Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) event.setCanceled(true);
return;
}