Macro Keybind Mod (MKB) for Minecraft
Publisher: zThiagoRThemes in package: 1
Syntax highlighting, snippets, color theme and autocomplete for Macro Keybind Mod (MKB) scripts for Minecraft
Syntax highlighting, snippets, color theme and autocomplete for Macro Keybind Mod (MKB) scripts for Minecraft
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| source.mkb | #FFFFFF | — |
| comment.line.double-slash.mkb | #AAAAAA | italic |
| string.quoted.double.mkb | #55FF55 | — |
| keyword.control.conditional.mkb, keyword.control.loop.mkb, keyword.control.unsafe.mkb, keyword.control.function.mkb, keyword.control.switch.mkb, keyword.control.flow.mkb, keyword.control.script.mkb, keyword.control.rocket.mkb | #AA00AA | bold |
| keyword.other.action.mkb | #FF55FF | — |
| punctuation.separator.mkb, punctuation.bracket.mkb, punctuation.accessor.mkb | #FF55FF | — |
| constant.numeric.integer.mkb, constant.numeric.float.mkb, constant.numeric.time.mkb | #5555FF | — |
| constant.language.boolean.true.mkb | #00AA00 | bold |
| constant.language.boolean.false.mkb | #AA0000 | bold |
| variable.language.mkb | #55FFFF | — |
| variable.other.numeric.mkb | #FF5555 | — |
| variable.other.string.mkb | #FF5555 | — |
| variable.other.label.mkb | #FF5555 | — |
| variable.other.array.mkb | #FFAA00 | — |
| variable.parameter.special.mkb, variable.parameter.numeric.mkb, variable.parameter.named.mkb, variable.parameter.array.mkb, variable.parameter.file.mkb, variable.parameter.mkb | #FFAA00 | — |
| keyword.operator.comparison.mkb, keyword.operator.logical.mkb, keyword.operator.arithmetic.mkb, keyword.operator.assignment.mkb, keyword.operator.range.mkb | #FFFF55 | — |
| keyword.operator.word.mkb | #00AAAA | — |
| support.type.iterator.mkb | #55FFFF | — |
| support.constant.keybind.mkb, support.constant.key.mkb | #55FFFF | — |
| entity.name.function.mkb, entity.name.function.call.mkb | #B9F2FF | — |
| constant.character.escape.mkb | #FFAA00 | — |
| constant.other.color-code.black.mkb | #000000 | bold |
| constant.other.color-code.dark-blue.mkb | #0000AA | — |
| constant.other.color-code.dark-green.mkb | #00AA00 | — |
| constant.other.color-code.dark-aqua.mkb | #00AAAA | — |
| constant.other.color-code.dark-red.mkb | #AA0000 | — |
| constant.other.color-code.dark-purple.mkb | #AA00AA | — |
| constant.other.color-code.gold.mkb | #FFAA00 | — |
| constant.other.color-code.gray.mkb | #AAAAAA | — |
| constant.other.color-code.dark-gray.mkb | #555555 | — |
| constant.other.color-code.blue.mkb | #5555FF | — |
| constant.other.color-code.green.mkb | #55FF55 | — |
| constant.other.color-code.aqua.mkb | #55FFFF | — |
| constant.other.color-code.red.mkb | #FF5555 | — |
| constant.other.color-code.light-purple.mkb | #FF55FF | — |
| constant.other.color-code.yellow.mkb | #FFFF55 | — |
| constant.other.color-code.white.mkb | #FFFFFF | — |
| constant.other.format-code.mkb | #AAAAAA | italic |
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}