Reference
Exact syntax, exact signatures, exact compiler output. Every snippet here is validated against swoftc — if it's shown compiling, it compiles; if it's shown failing, that's real compiler output, byte for byte.
Language
syntax, types, toolingSyntax CheatsheetEvery construct at a glance — the one-page version of the whole language.MapsThe
map<V> type — literals, map_* builtins, index sugar, iteration, persistent scalar maps.Collections & StringsThe receiver.method(args) forms — list, map, and String methods, pure vs mutating, and the zero-arg accessors.BuiltinsEvery builtin function with checked signatures.Event CatalogEvery Minestom event you can handle — a curated typed core plus the full generated catalog.CLI — swoftcCompile and check, sidecars, exit codes, how the runtime finds the binary.Content
things you place in the worldCustom Items
item declarations — material or skull, rarity, WYSIWYG lore, the nested NBT tag API, on_click.Custom Mobsmob declarations — AI, drops, handlers, the Mob value.EntitiesThe shared Entity table, spawn/mount/remove, velocity vectors, launching projectiles.Combat & PvPBuild vanilla combat in-language — the enriched EntityDamage event, attributes as entity properties, the damage/knock/apply/shoot verbs, and per-entity .tags.Fishingfishing_loot tables, the bite window, the four fishing events.Dispensers & DroppersBlock-entity inventories, the activation model, dispense from, BlockDispense.Offline PlayersThe OfflinePlayer type, the seen-store, the .player bridge.GUIsDeclarative inventories — slots, state, pagination, editable regions.Scoreboards & TablistsSidebars, player-list columns, bossbars, titles, actionbars.NametagsPer-viewer name, prefix, suffix, color.DisplaysText, item, and block display entities.HologramsThe hologram block — a billboarded line stack, per-viewer text, show/set/move statements.NPCsThe npc block — skinned, head-tracking player NPCs with inline click handlers.Platform
the server around your scriptsServer ConfigThe
server block — auth, http, permissions, MOTD, storage.WorldsAnvil/polar/storage loaders, world lifecycle, weather and time.BlocksThe block(...) state value, NBT tags, block_handler and placement_rule — plus the ready-made vanilla-placement addon.HTTP APIapi routes, request, reply.SongsNBS playback and metadata.Maps, Toasts, Skins & TPSMap canvases, toasts, skin control, TPS introspection, sounds, particles.Schedulersevery blocks and the schedule expression.Raw PacketsThe NMS escape hatch — sharp edges included.Internals
tooling and debugging onlyLooking for the stdlib addons — holograms, NPCs, music, abilities? They live in Libraries, alongside a tutorial on writing your own.