Skip to content
nsider4 edited this page Oct 22, 2026 · 2 revisions

ChatGames API

The ChatGames API lets your plugin add content to ChatGames-Premium (2.0.0 and newer) and react to what happens in it. Whatever you add plays like the built-in content: server owners configure it in the same files, it shows in the same menus and leaderboards, and it works from Spigot 1.8.8 to 26.x and on Folia.

What you can make

You want to... Use Page
Ask players something in chat (a quiz, a puzzle, a reaction test, a "click first" button) a chat game Chat Games
Have players race to do something in the world (kill bosses, vote, catch custom fish, walk...) a race Races
Give your plugin's rewards (crates, keys, coins, cosmetics) from any ChatGames reward list a reward action Reward Actions
Let daily and weekly challenges count something your plugin tracks a challenge type Challenge Types
React to games: anti-cheat, Discord messages, bonus points, statistics events Events
Start or stop games, read stats, give points, show leaderboards control and data Games and Player Data

Your first game in 2 minutes

  1. Add the API to your build and depend: [ChatGames-Premium] to plugin.yml (Getting Started).
  2. Register a game in onEnable:
@Override
public void onEnable() {
    ChatGamesAPI.get().registerGame(this, ChatGame.builder("capitals")
            .displayName("Capitals")
            .generator(context -> Question.builder("Paris")
                    .display("What is the capital of France?")
                    .build())
            .build());
}
  1. Start the server and type /chatgames capitals. The game is also in the automatic rotation, the menus, /chatgames top, the placeholders and the challenges, with no extra code.

All pages

Clone this wiki locally