diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-12-01 20:03:14 -0500 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-12-01 20:03:14 -0500 |
commit | db9ad0bcd3f31ee7ad29dcba99469872c5143dbe (patch) | |
tree | 851cfa8a7de9a96e756326c2997a1daa1e4f2aba /src/main/java/me/Danker/gui/buttons | |
parent | 425281727a291f36039b80acba12e3fd2304de1a (diff) | |
download | SkyblockMod-db9ad0bcd3f31ee7ad29dcba99469872c5143dbe.tar.gz SkyblockMod-db9ad0bcd3f31ee7ad29dcba99469872c5143dbe.tar.bz2 SkyblockMod-db9ad0bcd3f31ee7ad29dcba99469872c5143dbe.zip |
Fix warnings Eclipse didn't tell me about
Also rename TheMod.java to DankersSkyblockMod.java
Diffstat (limited to 'src/main/java/me/Danker/gui/buttons')
-rw-r--r-- | src/main/java/me/Danker/gui/buttons/LocationButton.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/me/Danker/gui/buttons/LocationButton.java b/src/main/java/me/Danker/gui/buttons/LocationButton.java index 061f198..a8937fd 100644 --- a/src/main/java/me/Danker/gui/buttons/LocationButton.java +++ b/src/main/java/me/Danker/gui/buttons/LocationButton.java @@ -34,12 +34,11 @@ public class LocationButton extends GuiButton { } else { splitText = text2.split("\n"); } - int index = 0; + int longestText = -1; - for (int i = 0; i < splitText.length; i++) { - int stringLength = mc.fontRendererObj.getStringWidth(splitText[i]); + for (String s : splitText) { + int stringLength = mc.fontRendererObj.getStringWidth(s); if (stringLength > longestText) { - index = i; longestText = stringLength; } } |