Skip to content

Commit

Permalink
fix: Command message is handled differently on 1.20+
Browse files Browse the repository at this point in the history
  • Loading branch information
null2264 committed Nov 12, 2023
1 parent 69e59f6 commit e552b12
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/io/github/null2264/cobblegen/CobbleGen.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ public static void initCommands(CommandDispatcher<CommandSourceStack> dispatcher
.then(LiteralArgumentBuilder.<CommandSourceStack>literal("reload-meta").executes(c -> {
CGLog.info("Reloading meta config...");
META_CONFIG = loadConfig(true, configFile, META_CONFIG, new ConfigMetaData(), ConfigMetaData.class);
c.getSource().sendSuccess(TextCompat.literal("Meta config has been reloaded"), false);
c.getSource().sendSuccess(
//#if MC>=1.20.1
//$$ () ->
//#endif
TextCompat.literal("Meta config has been reloaded"), false
);
CGLog.info("Meta config has been reloaded");
return 0;
}))
Expand All @@ -61,4 +66,4 @@ public enum Channel {
PING,
SYNC,
}
}
}

0 comments on commit e552b12

Please sign in to comment.