One plugin that adds Pollinations to your Paper, Folia or Spigot server. Every request is paid with your own Pollen: put your API key in the config and you are done.
Download: https://drjacky.github.io/PolliCraft/ (or the latest release)
- Villagers that talk.
/polli npc create Greta blacksmithspawns a villager with its own persona. Right-click it and just type in chat. It remembers the conversation, and players nearby hear its answers. Typebyeto stop. - Your own personas. Four are built in (blacksmith, librarian, farmer, guide). Add more in
config.yml, or describe one on the spot:/polli npc create Jack a grumpy pirate who only talks about treasure. - Prompt to map.
/polli image a cozy cabin in a snowy forestpaints the picture on a filled map. Hang it in an item frame. Maps are saved to disk and survive restarts. - Ask the AI.
/polli ask how do I find diamonds?answers in chat. - Any live model. Set
text-modelandimage-modelto any name or alias from the live text and image model lists./polli models textand/polli models imageshow them in game. - Safe for your Pollen. A per-player cooldown, a token cap and permission nodes for each feature. Villagers can't be hurt and don't wander off.
- Paper, Folia and Spigot. All HTTP calls are async, and results are applied on the right thread (region schedulers on Folia).
- Download
PolliCraft-<version>.jarfrom the download page and put it in your server'splugins/folder. - Start the server once. This creates
plugins/PolliCraft/config.yml. - Create an API key at enter.pollinations.ai/keys and paste it into
config.yml:(Or leave it empty and set theapi-key: "sk_..."
POLLINATIONS_API_KEYenvironment variable.) - Run
/polli reload(or restart). Try/polli ask hello.
Requirements: Java 21 and Minecraft 1.20.6 or newer (Paper, Folia, Purpur or Spigot). Tested on Paper 1.21.11.
| Command | What it does | Permission (default) |
|---|---|---|
/polli ask <question> |
Answer a question in chat | pollicraft.ask (everyone) |
/polli image <prompt> |
Paint a prompt on a map | pollicraft.image (everyone) |
| right-click an AI villager | Talk to it; type bye to stop |
pollicraft.talk (everyone) |
/polli npc create <name> [persona or description] |
Spawn an AI villager where you stand | pollicraft.npc (op) |
/polli npc persona <persona or description> |
Change the nearest AI villager's persona | pollicraft.npc (op) |
/polli npc remove |
Remove the nearest AI villager | pollicraft.npc (op) |
/polli npc personas |
List the personas in config.yml |
pollicraft.npc (op) |
/polli models [text|image] |
List the live Pollinations models | pollicraft.models (op) |
/polli reload |
Reload config.yml |
pollicraft.reload (op) |
| Skip the cooldown | pollicraft.bypasscooldown (op) |
/pollinations works as an alias.
api-key: "" # sk_... from https://enter.pollinations.ai/keys
api-base: "https://gen.pollinations.ai"
text-model: "openai" # any text model name or alias
image-model: "flux" # any image model name or alias
image-size: 512 # requested size, scaled to a 128x128 map
cooldown-seconds: 5 # per player, between AI requests
max-tokens: 300
timeout-seconds: 90
npc:
freeze: true # villagers stand still
invulnerable: true
talk-distance: 10 # walk further away and the chat ends
idle-timeout-seconds: 120
history-size: 12 # messages remembered per conversation
hear-radius: 16 # nearby players see the answers
default-persona: "blacksmith"
personas:
blacksmith: "You are {name}, a gruff but kind village blacksmith ..."
# add your own; {name} becomes the villager's nameThe full file with comments is in src/main/resources/config.yml.
- Text:
POST https://gen.pollinations.ai/v1/chat/completions(OpenAI-compatible) with the villager's persona as the system prompt and the recent conversation. - Images:
GET https://gen.pollinations.ai/image/{prompt}?model=...&width=...&height=..., centre-cropped and scaled to one 128x128 map. - Models:
GET /text/modelsandGET /image/models.
All calls send Authorization: Bearer <your key>, so usage is billed to your Pollen.
./gradlew build # runs the unit tests and builds build/libs/PolliCraft-<version>.jarMIT