Skip to content

Commit

Permalink
chore: fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
leaftail1880 committed Aug 5, 2024
1 parent 9b1d5d5 commit 2f074cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/lib/mail.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'lib/extensions/player'

import { Mail } from 'lib/mail'
import { Rewards } from 'lib/shop/rewards'
import { beforeEach, describe, expect, it } from 'vitest'
Expand Down
9 changes: 3 additions & 6 deletions src/modules/chat/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ class ChatBuilder {
const otherPlayers = allPlayers.filter(e => !nID.includes(e.id))
const messageText = event.message.replace(/\\n/g, '\n')
const message = `${getFullname(event.sender, { nameColor: '§7' })}§r: ${messageText}`
const fullrole = getFullname(event.sender, { name: false })

if (__SERVER__) {
// This is handled/parsed by ServerCore
// Dont really want to do request each time here
sendPacketToStdout('chatMessage', {
name: event.sender.name,
role: getFullname(event.sender, { name: false }),
role: fullrole,
print: message,
message: messageText,
})
Expand All @@ -95,11 +96,7 @@ class ChatBuilder {
}

const doHightlight = this.playerSettings(event.sender).hightlightMessages
event.sender.tell(
doHightlight
? `${getFullname(event.sender, { name: false, nameSpacing: true })}§6§lЯ§r: §f${messageText}`
: message,
)
event.sender.tell(doHightlight ? `${fullrole ? fullrole + ' ' : fullrole}§6§lЯ§r: §f${messageText}` : message)
} catch (error) {
console.error(error)
}
Expand Down

0 comments on commit 2f074cb

Please sign in to comment.