Add code to handle getting a player list from the server

This commit is contained in:
Oliver-Akins 2020-09-28 23:03:56 -06:00
parent 6f36a47d77
commit 19618cb218

View file

@ -39,9 +39,14 @@ export default {
}, },
sockets: { sockets: {
PlayerListResponse(data) { PlayerListResponse(data) {
if (data.success) {} else { if (data.success) {
this.$emit(`alert`) this.players = data.players;
} } else {
this.$emit(`alert`, {
message: data.message,
classes: [`warning`],
});
};
}, },
PlayerJoin() {}, PlayerJoin() {},
}, },