@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
22 lines (16 loc) • 411 B
text/typescript
import { world, system } from "@minecraft/server";
export default class Log {
static debug(name: string) {
console.warn(name);
// world.sendMessage("debug: " + name);
}
static debugAssert(condition: boolean, text?: string) {
if (!condition) {
let errorText = "Assertion failed";
if (text) {
errorText += ": " + text;
}
Log.debug(errorText);
}
}
}