feat!: rename to Canalhandia and add four chat games

Renames the plugin from Curiosidades to Canalhandia (the server name) now
that it covers more than curiosities, and adds:

- adivinha: the curiosity with the name hidden and clickable player names,
  revealing who guessed right. Curiosity sentences never contained the
  subject's name, so the same generator feeds both with no redaction step.
- luto: a clickable [F] under death messages with a closing count.
- enquete: polls with clickable options and a live boss-bar tally.
- ranking + marcos: leaderboards covering offline players, and one-time
  milestone announcements persisted to marcos.yml.

Fixes the reaction counter being invisible. Chat cannot be edited after
sending, so the button counts are necessarily frozen; previously the only
live surface was the boss bar and the buttons showed no number at all.
Counts now appear in the buttons at send time, on the boss bar, on the
reactor's action bar, and as a final tally line when the window closes.

Late clicks used to be dropped silently once the 90s window passed. The
last 8 reaction sets now stay live for reacao-validade-minutos (15).

Rankings read the stats JSON directly because Bukkit only exposes
statistics for online players.

Adds README.md documenting the design constraints that are easy to
mistake for bugs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ActvLGJApdxEAd2yfKPwqv
This commit is contained in:
marcos
2026-08-04 20:46:42 +00:00
parent 7fd3fc157c
commit 801b43610f
23 changed files with 2275 additions and 845 deletions
+33 -15
View File
@@ -1,32 +1,50 @@
name: Curiosidades
name: Canalhandia
version: "${project.version}"
main: dev.marcospaulo.curiosidades.Curiosidades
main: dev.marcospaulo.canalhandia.Canalhandia
api-version: "26.1.1"
description: Anuncia curiosidades sobre os jogadores com base nas estatísticas do servidor.
description: Interações sociais de chat para o servidor Canalhandia — curiosidades, adivinhas, enquetes, rankings e marcos.
author: Canalhandia
folia-supported: false
commands:
canalhandia:
description: Raiz de administração e destino dos botões clicáveis.
usage: /canalhandia
aliases: [cnh]
curiosidade:
description: Anuncia curiosidades e ajusta como elas funcionam.
description: Curiosidades sobre os jogadores.
usage: /curiosidade ajuda
aliases: [curiosidades, cur]
aliases: [curiosidades]
adivinha:
description: Inicia uma rodada de "adivinhe de quem é".
usage: /adivinha
enquete:
description: Abre uma enquete com opções clicáveis.
usage: /enquete Pergunta | Opção 1 | Opção 2
aliases: [poll]
ranking:
description: Placares do servidor.
usage: /ranking [categoria]
aliases: [rankings, placar]
permissions:
# Declared explicitly: an undeclared Bukkit permission falls back to op-only,
# which would silently stop normal players reacting or opting out.
curiosidades.reagir:
description: Permite reagir às curiosidades.
# which would silently stop normal players reacting, voting or guessing.
canalhandia.reagir:
description: Permite reagir e prestar luto.
default: true
curiosidades.ver:
description: Permite usar /curiosidade ver e /curiosidade listar.
canalhandia.ver:
description: Permite /curiosidade ver, listar e /ranking.
default: true
curiosidades.forcar:
description: Permite disparar um anúncio manualmente.
canalhandia.enquete:
description: Permite abrir enquetes.
default: true
canalhandia.forcar:
description: Permite disparar curiosidades e adivinhas manualmente.
default: op
curiosidades.admin:
description: Permite mudar modo, intervalo, categorias e reações.
canalhandia.admin:
description: Permite mudar módulos, modo, intervalo, categorias e reações.
default: op
curiosidades.isento:
canalhandia.isento:
description: Quem tem isto nunca é sorteado como assunto.
default: false