Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 5c4731c

Browse files
committed
fix not being able to specify npc player name
1 parent 834e910 commit 5c4731c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/io/github/dockyardmc/npc/FakePlayer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ import io.github.dockyardmc.utils.MojangUtil
3434
import java.util.*
3535
import java.util.concurrent.CompletableFuture
3636

37-
class FakePlayer(location: Location) : Entity(location) {
37+
class FakePlayer(location: Location, val name: String = UUID.randomUUID().toString().substring(0, 16)) : Entity(location) {
3838
override var type: EntityType = EntityTypes.PLAYER
3939
override val health: Bindable<Float> = bindablePool.provideBindable(20f)
4040
override var inventorySize: Int = 35
41-
val gameProfile = GameProfile(uuid, uuid.toString().substring(0, 16))
41+
val gameProfile = GameProfile(uuid, name)
4242

4343
private val eventPool = EventPool().withFilter(EventFilter.containsEntity(this))
4444

0 commit comments

Comments
 (0)