Skip to content

Commit 6c6f5d1

Browse files
committed
Further cleanup
1 parent ec16147 commit 6c6f5d1

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

src/main/java/org/betacraft/Classic12aWrapper.java

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,15 @@ public void stop() {
160160
runningField.set(run, false);
161161
}
162162
}
163-
Method real12a = clazz.getDeclaredMethod("a", null);
164-
if (real12a == null) {
163+
164+
Method real12a;
165+
try {
166+
real12a = clazz.getDeclaredMethod("a");
167+
} catch (NoSuchMethodException noSuchMethodException) {
165168
// 12a-dev
166-
real12a = clazz.getDeclaredMethod("stop", null);
169+
real12a = clazz.getDeclaredMethod("stop");
167170
}
171+
168172
real12a.invoke(run);
169173
}
170174
}
@@ -188,11 +192,15 @@ public void destroy() {
188192
if (name.contains("mojang")) {
189193
final Class<?> clazz = classLoader.loadClass(name);
190194
mcField.setAccessible(true);
191-
Method real12a = clazz.getDeclaredMethod("a", null);
192-
if (real12a == null) {
195+
196+
Method real12a;
197+
try {
198+
real12a = clazz.getDeclaredMethod("a");
199+
} catch (NoSuchMethodException noSuchMethodException) {
193200
// 12a-dev
194-
real12a = clazz.getDeclaredMethod("destroy", null);
201+
real12a = clazz.getDeclaredMethod("destroy");
195202
}
203+
196204
real12a.invoke(run);
197205
}
198206
}

src/main/java/org/betacraft/Classic15aWrapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public void stop() {
162162
runningField.set(run, false);
163163
}
164164
}
165-
clazz.getDeclaredMethod("b", null).invoke(run);
165+
clazz.getDeclaredMethod("b").invoke(run);
166166
}
167167
}
168168
} catch (Exception ex) {
@@ -185,7 +185,7 @@ public void destroy() {
185185
if (name.contains("mojang")) {
186186
final Class<?> clazz = classLoader.loadClass(name);
187187
mcField.setAccessible(true);
188-
clazz.getDeclaredMethod("a", null).invoke(run);
188+
clazz.getDeclaredMethod("a").invoke(run);
189189
}
190190
}
191191
}

src/main/java/org/betacraft/launcher/BC.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class BC {
1212
public static PropertyFile SETTINGS;
1313

1414
// TODO better check this before release
15-
public static boolean prerelease = true;
15+
public static boolean prerelease = false;
1616
public static boolean nightly = false;
1717

1818
public static boolean portable = false;

src/main/java/org/betacraft/launcher/Launcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
/** Main class */
4949
public class Launcher {
50-
public static String VERSION = "1.09_17-rc3"; // TODO Always update this
50+
public static String VERSION = "1.09_17"; // TODO Always update this
5151

5252
public static Instance currentInstance;
5353
public static boolean forceUpdate = false;

0 commit comments

Comments
 (0)