Fix uuid handling in player map

This commit is contained in:
James Lyne 2021-07-28 22:17:02 +01:00
parent 110c75f9a3
commit 4350fae1d5

View File

@ -416,6 +416,7 @@ export const mutations: MutationTree<State> & Mutations = {
const existing = state.players.get(player.name); const existing = state.players.get(player.name);
existing!.health = player.health; existing!.health = player.health;
existing!.uuid = player.uuid;
existing!.armor = player.armor; existing!.armor = player.armor;
existing!.location = Object.assign(existing!.location, player.location); existing!.location = Object.assign(existing!.location, player.location);
existing!.hidden = player.hidden; existing!.hidden = player.hidden;
@ -429,6 +430,7 @@ export const mutations: MutationTree<State> & Mutations = {
state.sortedPlayers.dirty = true; state.sortedPlayers.dirty = true;
state.players.set(player.name, { state.players.set(player.name, {
name: player.name, name: player.name,
uuid: player.uuid,
health: player.health, health: player.health,
armor: player.armor, armor: player.armor,
location: player.location, location: player.location,