A Minecraft plugin providing a dynamic GUI for various minigames.
Players can challenge each other in games like Tic Tac Toe, Connect Four, Rock Paper Scissors, Memory, Guess Who, and Numbers.
- Multiple minigames available in-game
- Dynamic game-selection GUI with game icons and descriptions
- Clickable player invitations
- Sound and message feedback for game events
- Extensible API for adding new minigames
Download the latest plugin JAR from the project's GitHub Releases and place it in
the server's plugins directory. The plugin requires Paper 1.21.11 and Java 21
or newer.
Releases are created automatically from commits pushed to master using
Semantic Release. Manual tag creation is not required.
fix: ...creates a patch releasefeat: ...creates a minor releasefeat!: ...or a commit withBREAKING CHANGE:creates a major release
Each release contains the built shadow JAR as a downloadable asset and is
published to Modrinth for Paper automatically. Configure the repository secret
MODRINTH_TOKEN with the Modrinth Create versions scope to enable Modrinth
publishing.
- Use
/1v1or/1vs1to open the game-selection GUI. - Select a game and enter an online player's name in chat. Press
Tabfor name completion. - The selected player receives a clickable invitation. The game starts after the invitation is accepted.
- Type
/exitto cancel the player-selection dialog.
- Tic Tac Toe
- Connect Four
- Rock Paper Scissors
- Memory
- Guess Who
- Numbers Game
You can easily add new minigames by implementing the provided API. Follow these steps:
Extend the abstract Game class and implement required properties and methods:
class MyNewGame : Game({ MyNewGameInventory() }) {
override val key: String = "mynewgame"
override val name: String = "My New Game"
override val title: Component = Component.text("My New Game")
override val description: String = "Description of your new game."
override val icon: Material = Material.COMPASS
override fun initialize() {
// Initialize game state and open player inventories.
openPlayerInventories()
}
override fun receiveEvent(eventId: String, vararg data: Any) {
// Handle game events (e.g., click)
}
}Extend the GameInventory class to define the GUI for your game:
class MyNewGameInventory : GameInventory(3) {
private val quitIndex = 26
override fun initialize() {
// Set up the inventory.
setQuitItem(quitIndex)
}
override fun onClick(originalEvent: InventoryClickEvent) {
val player = originalEvent.whoClicked as Player
if (handleQuitClick(originalEvent, quitIndex)) return
// Handle inventory clicks and send events to the game.
game.receiveEvent("click", player, originalEvent.rawSlot)
}
}Add your game to the GameFactory:
val games: List<() -> Game> = listOf(
{ TicTacToeGame() },
... // other games
{ MyNewGame() } // <-- Add your game here
)- Start your server and verify your game appears in the
/1v1GUI. - Playtest to ensure all features work as expected.
Game: Abstract class to extend for creating new games.GameInventory: Class to extend for creating custom game GUIs.GamePlayer: Data class linking a player to their inventory.Game.icon: Material displayed in the game-selection GUI.Game.openPlayerInventories(): Opens each player's dedicated inventory.Game.forEachPlayerInventory(): Applies logic to typed game inventories.GameInventory.handleQuitClick(): Handles the shared quit button.- Utility classes:
SoundUtil,ItemStacksUtil,MessageSenderfor common tasks.
- Paper 1.21.11
- Java 21 or newer
- Paper 26.x test servers require Java 25 or newer
Separate Gradle tasks are available for testing the Paper 26.x versions. Each
task uses its own directory under run, so worlds and server files do not overwrite
each other:
./gradlew runPaper261
./gradlew runPaper262
On Windows, use gradlew.bat instead of ./gradlew. The server directories are
run/26.1.2 and run/26.2. The normal runServer task uses run/1.21.11.
There are also existing games in the games package that you can refer to for examples.
The Game and GameInventory classes provide a lot of functions and properties to make development easier and keep consistency across games. Make sure to check them out!