Skip to content

Commit b9bf702

Browse files
committed
update: optimize code
1 parent 90ff370 commit b9bf702

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/io/github/optijava/opt_carpet_addition/commands/CrashCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ public static int prepare(CommandContext<ServerCommandSource> context) {
4747

4848
public static int confirm(CommandContext<ServerCommandSource> context) {
4949
if (!isPreparing) {
50-
Messenger.m(context.getSource(), "r Nothing to abort.");
50+
Messenger.m(context.getSource(), "r Nothing to confirm.");
5151
return 0;
5252
}
5353
OptCarpetAddition.LOGGER.fatal("[OCA Crash Command] Confirm Crash!");
54-
Runtime.getRuntime().halt(1);
55-
return 1;
54+
// Runtime.getRuntime().halt(1);
55+
throw new RuntimeException("[OCA Crash Command] Confirm Crash!");
5656
}
5757

5858
public static int abort(CommandContext<ServerCommandSource> context) {

src/main/java/io/github/optijava/opt_carpet_addition/logger/disk/DiskHUDLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
public class DiskHUDLogger extends AbstractHUDLogger {
2121

2222
public static final DiskHUDLogger INSTANCE;
23-
private static final long TO_GB = 1024*1024*1024;
23+
private static final long TO_GB = 1024L*1024L*1024L;
2424

2525
static {
2626
try {

0 commit comments

Comments
 (0)