You've already forked AstralRinth
feat: add info event listener and payload for enhanced event handling
- Implemented `info_listener` in `events.js` to listen for 'info' events and handle payloads. - Added `emit_info` function in `emit.rs` to emit 'info' events with a message payload. - Defined `InfoPayload` struct in `mod.rs` to structure the data for 'info' events. - Integrated `emit_info` calls in the Minecraft launch logic to provide feedback on account types. - Introduced a new offline icon in SVG format and removed outdated pirate icons from assets. - Updated asset index to include the new offline icon and removed references to deleted icons.
This commit is contained in:
@@ -97,3 +97,8 @@ export async function warning_listener(callback) {
|
||||
export async function friend_listener(callback) {
|
||||
return await listen('friend', (event) => callback(event.payload))
|
||||
}
|
||||
|
||||
// [AR] Payload for the 'info' event
|
||||
export async function info_listener(callback) {
|
||||
return await listen('info', (event) => callback(event.payload))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user