runebook · rune
runebook · rune
manifest: sha256:07f593e5ece0c3770e5a556923aee1bec6158515048a4de8296c2541cc2247bb
rune add @rune/preferences@0.1.0rune add @rune/preferences, then restart Paper.
/preferences shows your current values. Run /preferences announcements,
/preferences actionbars, or /preferences sounds to toggle a value.
Other Runes opt into honoring these preferences through the service.
const prefs = rune.services.get<{
get(id: string, setting: "announcements" | "actionbars" | "sounds"): boolean;
}>("preferences", 1);
if (prefs?.get(String(player.getUniqueId()), "sounds") !== false) {
// Play your Rune's sound.
}
The preferences.changed event carries { playerId, key, value }.
Defaults are enabled and changes persist by player UUID.