Tutorial: your first script — welcome message on join
Overview
Section titled “Overview”Build a rule that greets players in chat when they join the server, in two ways with the Logic graph (Blueprints), and check the result in editor Play.
| Part | What you build | Text in the chat (editor Play) |
|---|---|---|
| Part 1 | When a player joins → Chat message (replaces {player} in the text) | “Welcome, player!” |
| Part 2 | When a player joins → Get player property (name) → Text operation (joins text with concat) → Chat message | “Hello, player!” |
In editor Play, the moment your body appears counts as “When a player joins”, and the body’s name is player. On a real server, the Minecraft name of the player who joined is used.
Preparation: open a world with ground to walk on in Play. The screenshots in this tutorial were taken with the sample world castle.npworld (in the samples folder of the install folder). To give the logic graph more room, the “Left area”, “Top right area” and “Bottom right area” checks in the Window menu are off, and the details area on the left is hidden with the ⚙ (details) button on the logic graph toolbar.
Basic use
Section titled “Basic use”Part 1: send a welcome message on join
Section titled “Part 1: send a welcome message on join”-
Click Tools > Logic graph. The Logic graph tab opens in the bottom dock area.

-
Right-click an empty spot in the graph. When the Add node window opens, type
joinin the search box. When a player joins appears in the list.
-
Click When a player joins. A red event node (a new rule) appears. On its right are a white exec pin and the Player and First join value pins.

-
Drag the white exec pin on the right of the event node and drop it on an empty spot. In the window that opens (“Connects after this” — shows only the nodes that can come after it), type
chatin the search box and click Chat message. The node appears where you dropped the wire and connects to the event.
-
Type
Welcome, {player}!in the Text field of the Chat message node. Leave To whom at its default (the triggering player). Check passed appears on the right of the toolbar.
-
Click the ▶ (Play) button in the middle of the toolbar. The rule runs as the body appears, and “Welcome, player!” appears in the chat at the bottom left of the viewport.

-
Press Esc to stop Play.
Part 2: get the name and join text
Section titled “Part 2: get the name and join text”-
Click the eye button in the header of the Part 1 event node to turn the rule off. A rule that is off is dimmed and does not run in Play or on the server (it is not deleted, so you can turn it back on).

-
As in steps 2–3, right-click an empty spot in the graph and create another When a player joins event.
-
Drag the Player pin (blue circle) of the new event node and drop it on an empty spot. In the window that shows only the nodes that take that value, type
propertyand click Get player property.
-
Check that the Player field of the new node is wired to the event’s Player pin (
← player) and that Properties isDisplay name (name). The name comes out of the Values pin on the right of the node (Result variablep1).
-
Drag the Values pin and drop it on an empty spot, type
text operationin the search box, then click Text operation. A node with Calculate set toconcat(A + B + C) appears, and the value is first wired to field A (Result variablet1).
-
Drag the Values pin to the pin of field B on the Text operation node. The name goes in the middle (B).

-
Click the World logic tab. This rule is selected in the list (“Sync with list” in the logic graph). Type
Hello,(with one trailing space) in field A of the Text operation card.
In the 0.11.0 logic graph, too, you cannot turn a wired field back into a direct input field. Clicking the “Detach variable” button next to the field wires field A back to its default
{player}. In the World logic tab, which shows the same rule, you can edit every field as text. -
Click the Logic graph tab and type
!in field C of the Text operation node. Field A shows the text you entered in step 14.
-
Drag the white exec pin of the Text operation node and drop it on an empty spot, type
chatin the search box, then click Chat message.
If you drop the Result pin on an empty spot and pick Chat message, 0.11.0 also wires the result to the hidden “Reference actor” field instead of the Text field (the text stays empty and the check fails). That is why you add the node from the exec pin and wire the result to the Text field yourself in the next step.
-
Drag the Result pin of the Text operation to the pin of the Text field on the Chat message. The Text field becomes
← t1.
-
Check that the chain runs When a player joins → Get player property → Text operation → Chat message and that Check passed appears on the toolbar.

-
Click the ▶ (Play) button. “Hello, player!” appears in the chat. The Part 1 rule is off, so “Welcome, …” does not appear.

-
Press Esc to stop Play. Everything changed during Play returns to its original state.
Tips and tricks
Section titled “Tips and tricks”- To insert only the name, drag the event’s Player pin straight to the pin of the Chat message Text field, without a break-out node. Pick “Player name → Text” in the “How should … go into …?” menu, and the Text field becomes
{player|name}(one undo cancels it). {name}in a text field is replaced with its value at run time.{player}= the triggering player’s name,{p1}·{t1}= the results of earlier nodes. That is why one text (Part 1) and a chain of nodes (Part 2) give the same result.- A rule turned off with the eye button, like the Part 1 rule, can stay in place without being deleted. Use this to alternate between two approaches while testing.
- The log in the World logic tab keeps the rules fired during Play and the “Chat …” lines (bottom left of the step 14 screenshot).
Reference
Section titled “Reference”Check on a real server
Section titled “Check on a real server”These steps happen outside the editor (game server · Minecraft client), so there are no screenshots.
- Prepare a game server: Paper 1.21 or later, Java 21. Put the server plugin NPBridge 2.4.0 in the server’s
pluginsfolder. The NPBridge jar is in the editor install folder (%LOCALAPPDATA%\Programs\NP Editor\server\NPBridge.jar). Detailed installation is in Installing NPBridge (server admins). - Upload the rules to the server. Use one of the following.
- Live connection: when you connect the editor to the server (NPBridge default port 25590), every rule edit goes to the server immediately — Server connection (live).
- Scene export: build an
.npbuild(including scene.json) that contains the rules and install it on the server — Export and import.
- Join the server in Minecraft. If “Welcome, <your name>!” (Part 1) or “Hello, <your name>!” (Part 2) appears in the chat, it worked.
- The server plugin is the version bundled with the editor (NPBridge 2.4.0). Logic that uses 0.10.2’s new flow nodes (Do Once · Flip Flop …) is not uploaded to servers older than NPBridge 2.0.8 — see “NPBridge 2.0.8” in Logic graph.
- On the server, “When a player joins” runs when a player joins the server (scene), and the triggering player = the player who joined.
Nodes used
Section titled “Nodes used”| Node | Group | Fields and pins used in this tutorial |
|---|---|---|
When a player joins (join) | Event · Flowing | Outputs Player · First join |
Chat message (message) | Actions · View | Text · To whom |
Get player property (player_get) | Actions · Player | Player · Properties · Result variable · output Values |
Text operation (text) | Actions · Text | Calculate (concat) · A · B · C · Result variable · output Result |
Related pages
Section titled “Related pages”Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft.