From edc2200ecdd620484631abf0baa4583d9c65b127 Mon Sep 17 00:00:00 2001 From: Matthias von Bargen Date: Sun, 5 Apr 2026 21:01:08 +0200 Subject: [PATCH] fix player name on label --- README.md | 2 +- packages/multiplayer-template/client/src/Entities/Player.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 24311e6..acc0717 100644 --- a/README.md +++ b/README.md @@ -72,4 +72,4 @@ This is early-stage software built out of real project needs. APIs will change a still tightly coupled to specific setups. Contributions and PRs are welcome — see the [contributing guide](https://mavonengine.com/getting-started/contributing) to get started. -Join the [community](https://mavonengine.com/community) for development discussions. \ No newline at end of file +Join the [community](https://mavonengine.com/community) for development discussions. diff --git a/packages/multiplayer-template/client/src/Entities/Player.ts b/packages/multiplayer-template/client/src/Entities/Player.ts index 0fbe344..f5df611 100644 --- a/packages/multiplayer-template/client/src/Entities/Player.ts +++ b/packages/multiplayer-template/client/src/Entities/Player.ts @@ -38,8 +38,10 @@ export default class Character extends BasePlayer { return { ...super.networkedFieldCallbacks(), name: (v) => { - if (v) + if (v && !this.name) { + this.label.setName(v as string) this.name = v as string + } }, } }