Skip to content

Commit

Permalink
fix: removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 committed Oct 6, 2024
1 parent 7d2ae22 commit 7c33079
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/main/java/net/guizhanss/minecraft/guizhanlib/GuizhanLib.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public void enable() {
configManager = new ConfigManager(this);

setupMinecraftLanguage();

if (!isUnitTest) {
setupUpdater();
setupMetrics();
universalUpdater.start();
}
Expand All @@ -82,21 +82,6 @@ private void setupMinecraftLanguage() {
}
}

private void setupUpdater() {
if (configManager.isDebugEnabled()) {
// enable debug messages in UpdaterTask
try {
Class<?> clazz = Class.forName("net.guizhanss.guizhanlib.updater.UpdaterTask");
Field field = clazz.getDeclaredField("debug");
field.setAccessible(true);
field.set(null, true);
} catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException ex) {
getLogger().log(Level.SEVERE, ex, () -> "An error occurred while enabling debug messages in auto " +
"updater");
}
}
}

private void setupMetrics() {
final Metrics metrics = new Metrics(this, 15713);

Expand Down

0 comments on commit 7c33079

Please sign in to comment.