Documentation is a work in progress — some pages may be incomplete.
Unify

Your First Plugin

A beginners guide to make your first plugin using Unify!

While this plugin is designed to be beginner friendly, lets go through a full plugin example!

This walkthrough builds ArcadeHub — a hub plugin with a /games command that opens a menu, tracks player stats, and uses colors and sounds. By the end you'll have used commands, menus, storage, color translation, and player utilities together.


1. Project Structure

Click any file to expand and see the code. Folders expand and collapse.

Project

Honey handles serialization automatically with Gson. All you need to do is define it, write it, and retrieve it!


2. Build and Test

./gradlew shadowJar

Copy build/libs/ArcadeHub.jar to your dev server's plugins/ folder (alongside Unify.jar), then start the server.

In game, open the menu using /game and click a game to "queue" — it increments your gamesPlayed count and saves to flatfile. Rejoin the server and your stats persist.


3. What You Just Built

FeatureHow It's Used
Commands/games and /games stats via ACF
Menu SystemPaginatedBorderedMenu with custom buttons
StorageHoney flatfile for persistent player stats
Color TranslationCC.translate() on every string
Player UtilsSounds, titles, and action feedback
Item BuilderUsed internally by Button for item stacks

4. Extend It

Here are natural next steps to keep learning:

Add a win condition:

// In your game logic
stats.wins++
plugin.statsStore.store(stats.uuid, stats)
PlayerUtils.sendTitle(player, "&6&lVictory!", "&7You won the game!", 10, 60, 10)

Add leaderboard holograms: See Holograms to display top players at spawn.

Add scoreboard sidebar: See Scoreboard to show live stats while playing.

Add per-game permissions: See Commands to gate games behind ranks.

Switch to SQL storage: See Storage — change DataStoreType.FLATFILE to SQL and add a SQLite path. The store API stays identical.


Next Steps

  • Commands — Subcommands, tab completion, context resolvers
  • Menu System — Interactive menus, ConfirmMenu, animations
  • Storage — SQL, MongoDB, Redis backends
  • Players — More sound, title, and action bar patterns

On this page