diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-07-07 10:32:38 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-07-07 10:32:38 +0800 |
commit | f1c7bae88a2ccd42689b1c989b0bc8bc9aed774b (patch) | |
tree | 552635e4da1abbea7cb93d54af2ef0fcec4b6431 /features/dungeonMap/index.js | |
parent | 2d46bc531362977061383edea16a117d0af0ff0e (diff) | |
download | SoopyV2-f1c7bae88a2ccd42689b1c989b0bc8bc9aed774b.tar.gz SoopyV2-f1c7bae88a2ccd42689b1c989b0bc8bc9aed774b.tar.bz2 SoopyV2-f1c7bae88a2ccd42689b1c989b0bc8bc9aed774b.zip |
+ fix heads not getting rendered on spirit leap overlay unless their name is lowercase
Diffstat (limited to 'features/dungeonMap/index.js')
-rw-r--r-- | features/dungeonMap/index.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/features/dungeonMap/index.js b/features/dungeonMap/index.js index 4199626..71429ea 100644 --- a/features/dungeonMap/index.js +++ b/features/dungeonMap/index.js @@ -160,12 +160,12 @@ class DungeonMap extends Feature { this.registerChat("&r&c ☠ ${info} and became a ghost&r&7.&r", (info, e) => { let player = ChatLib.removeFormatting(info.split(" ")[0]) - this.deadPlayers.add(this.nameToUUID[player]) + this.deadPlayers.add(this.nameToUUID[player.toLowerCase()]) }); this.registerChat("&r&a ❣ &r${info} was revived${*}!&r", (info, e) => { let player = ChatLib.removeFormatting(info.split(" ")[0]) - this.deadPlayers.delete(this.nameToUUID[player]) + this.deadPlayers.delete(this.nameToUUID[player.toLowerCase()]) }); this.registerStep(true, 3, () => { @@ -387,13 +387,13 @@ class DungeonMap extends Feature { if (Player.getContainer().getName().startsWith("Catacombs - Floor ")) { this.nameToUUID = {} World.getAllPlayers().forEach(p => { - this.nameToUUID[p.getName()] = p.getUUID().toString() + this.nameToUUID[p.getName().toLowerCase()] = p.getUUID().toString() }) let playerI = 0 for (let i = 0; i < 5; i++) { let name = ChatLib.removeFormatting(Player.getContainer().getStackInSlot(3 + i)?.getName()?.split(" ")?.pop() || "") - if (this.nameToUUID[name] && this.nameToUUID[name] !== Player.getUUID().toString()) { - this.idToPlayer[playerI] = this.nameToUUID[name] + if (this.nameToUUID[name.toLowerCase()] && this.nameToUUID[name.toLowerCase()] !== Player.getUUID().toString()) { + this.idToPlayer[playerI] = this.nameToUUID[name.toLowerCase()] if (name) playerI++ } } @@ -741,7 +741,7 @@ class DungeonMap extends Feature { username: player.getName(), uuid: player.getUUID().toString() }) - this.nameToUUID[player.getName()] = player.getUUID().toString() + this.nameToUUID[player.getName().toLowerCase()] = player.getUUID().toString() }) // console.log("Sending: " + JSON.stringify(this.people, undefined, 2)+JSON.stringify(data, undefined, 2)) socketConnection.sendDungeonData(this.people, data) |