diff options
author | My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> | 2020-12-05 21:15:31 -0500 |
---|---|---|
committer | My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> | 2020-12-05 21:15:31 -0500 |
commit | c8c49fa551a4c5867a43d4b13aa4d5d78dfe87dd (patch) | |
tree | 8e2efd9d109cbf0f78ba5a5b4dbad8c67fc390e4 | |
parent | ac5ff849332ab6817dabb06bfc7c511f3442b9f6 (diff) | |
download | SkyblockMod-c8c49fa551a4c5867a43d4b13aa4d5d78dfe87dd.tar.gz SkyblockMod-c8c49fa551a4c5867a43d4b13aa4d5d78dfe87dd.tar.bz2 SkyblockMod-c8c49fa551a4c5867a43d4b13aa4d5d78dfe87dd.zip |
Fix out of bound exception
Added size check for pattern
-rw-r--r-- | src/main/java/me/Danker/DankersSkyblockMod.java | 2 |
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; } |