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.
Honey handles serialization automatically with Gson. All you need to do is define it, write it, and retrieve it!
2. Build and Test
./gradlew shadowJarCopy 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
| Feature | How It's Used |
|---|---|
| Commands | /games and /games stats via ACF |
| Menu System | PaginatedBorderedMenu with custom buttons |
| Storage | Honey flatfile for persistent player stats |
| Color Translation | CC.translate() on every string |
| Player Utils | Sounds, titles, and action feedback |
| Item Builder | Used 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