Commit 1219bac91b7efb87bf23bde44f8c4194b3f261d3

Authored by Mumfrey
1 parent 5bade2f0

fix isModInstalled always return true

java/client/com/mumfrey/liteloader/client/gui/GuiPanelAbout.java
... ... @@ -156,7 +156,6 @@ class GuiPanelAbout extends GuiPanel implements ScrollPanelContent
156 156 if (twitterUserName != null)
157 157 {
158 158 URI twitterURI = URI.create("https://www.twitter.com/" + twitterUserName);
159   - System.out.println(twitterURI);
160 159 this.openURI(twitterURI);
161 160 }
162 161 }
... ...
java/common/com/mumfrey/liteloader/core/LiteLoaderMods.java
... ... @@ -162,12 +162,14 @@ public class LiteLoaderMods
162 162 */
163 163 public boolean isModInstalled(String modName)
164 164 {
165   - for (LiteMod mod : this.allMods)
  165 + try
166 166 {
167   - if (modName.equalsIgnoreCase(mod.getName()) || modName.equalsIgnoreCase(mod.getClass().getSimpleName())) return true;
  167 + return this.getMod(modName) != null;
  168 + }
  169 + catch (IllegalArgumentException ex)
  170 + {
  171 + return false;
168 172 }
169   -
170   - return true;
171 173 }
172 174  
173 175 /**
... ...