Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Notifications debug command doesn't check if debug is enabled #1019

Open
kevinthegreat1 opened this issue Oct 11, 2024 · 0 comments
Open
Labels
bug Something isn't working good first issue Welcome new contributors :)

Comments

@kevinthegreat1
Copy link
Collaborator

What happened?

Event Notifications debug command doesn't check if debug is enabled

Screenshots

This should be wrapped in an if Debug.debugEnabled() check.

ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) -> dispatcher.register(
ClientCommandManager.literal("skyblocker").then(
ClientCommandManager.literal("debug").then(
ClientCommandManager.literal("toasts").then(
ClientCommandManager.argument("time", IntegerArgumentType.integer(0))
.then(ClientCommandManager.argument("jacob", BoolArgumentType.bool()).executes(context -> {
long time = System.currentTimeMillis() / 1000 + context.getArgument("time", int.class);
if (context.getArgument("jacob", Boolean.class)) {
MinecraftClient.getInstance().getToastManager().add(
new JacobEventToast(time, "Jacob's farming contest", new String[]{"Cactus", "Cocoa Beans", "Pumpkin"})
);
} else {
MinecraftClient.getInstance().getToastManager().add(
new EventToast(time, "Jacob's or something idk", new ItemStack(Items.PAPER))
);
}
return 0;
}
)
)
)
)
)
));

Log output

No response

Minecraft Version

1.21.0/1.21.1

Skyblocker Version

skyblocker-1.22.2+1.21.1

Additional context

No response

@kevinthegreat1 kevinthegreat1 added bug Something isn't working good first issue Welcome new contributors :) labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Welcome new contributors :)
Projects
None yet
Development

No branches or pull requests

1 participant