Journalism

Journalism

A paper plugin that allows you to create journals for in-game wiki/guide or unlockable journals for lore.

30 downloads 0 followers

An in-game journal for Paper servers.

Players run /journal and browse sections, categories and entries in a chest menus format. An entry can open a book, a sign or another menu, or simply be an item that have the name and lore are the content.

Every menu is a YAML file and nothing is hard-coded. Build the journal by editing files, or build it in game with commands and write the books and signs without leaving the server.

Use it for lore, rules, guides, a server wiki, changelogs, or anything else players should be able to look up.

Features

  • Three levels, all folders. Sections hold categories, and categories hold entries. Add a category or entry folder, reload, and it is listed in the menu.
  • Lists that fill themselves in. Leave empty slots in a layout and the plugin puts the categories or entries there, sorted by name or by a priority you set, over as many pages as it takes.
  • Four kinds of entry. A book, a sign, a whole inventory, or a plain item with a name and lore.
  • Menus drawn in text. A layout is rows of 9 characters, and each character is an item you define once.
  • Build it in game. Create, rename and delete pages with commands. The item for a page is taken from your hand, custom heads included.
  • Write it in game. Edit a book in a book and quill, edit a sign on the sign screen, or type either one into chat.
  • MiniMessage everywhere. Titles, item names, lore, book pages and sign lines all take tags like <green> and <bold>.
  • Renaming does not break links. When a page is renamed, every button that pointed at it is updated.
  • Players keep their place. /journal reopens the menu they were last on, and layouts can have back, home, next and previous buttons.
  • Safe reloads. /journal reload and the server's own /reload read the files again. A broken page is skipped with the reason in the console, and the rest keeps working.
  • Nothing else needed. No dependencies and no database. Signs are shown without placing a block.

How it is organized

plugins/Journalism/
├── inventory.yml                 the main menu
└── data/
    └── lore/                     section
        ├── item.yml
        ├── layout.yml
        └── dragons/              category
            ├── item.yml
            ├── layout.yml
            └── ender_dragon/     entry
                ├── item.yml
                └── book.yml

layout.yml is the menu players see. item.yml is the item that stands for that page in the menu above it.

The file inside an entry folder decides what clicking the entry does:

File Clicking the entry
book.yml Opens a book
sign.yml Opens a sign
inventory.yml Opens another menu
none of them Nothing, the item itself is what players read

What the files look like

A category menu. The 14 empty slots are filled with its entries, and the title shows the page number:

title: "Dragons (%page%/%pages%)"
layout:
  - "b#######h"
  - "#       #"
  - "#       #"
  - "###p#n###"
items:
  "#":
    material: gray_stained_glass_pane
    name: " "
  b:
    material: arrow
    name: "<yellow>Back"
    function: back
  h:
    material: nether_star
    name: "<green>Home"
    function: home
  p:
    material: arrow
    name: "<yellow>Previous page"
    function: prev
  n:
    material: arrow
    name: "<yellow>Next page"
    function: next

A book entry:

pages:
  - "<bold>The Ender Dragon</bold>\n\nIt lives in <dark_purple>the End</dark_purple>."
  - "Each item in the list is one page. Text that does not fit moves on to the next page."

Commands

/journal                                              open the journal
/journal help                                         list the commands you can use
/journal reload                                       read the files again

/journal section  <create|open|rename|delete> ...     manage sections
/journal category <create|open|rename|delete> ...     manage categories
/journal entry    <create|open|edit|delete> ...       manage entries
/journal <section|category|entry> item set <material|name> ...
/journal edit     <save|cancel|restart>               finish editing in chat

Making a page from nothing:

/journal section create lore
/journal category create lore dragons
/journal entry create lore dragons ender_dragon book
/journal entry item set name lore dragons ender_dragon <dark_purple>The Ender Dragon
/journal entry edit lore dragons ender_dragon

Permissions

Permission Default Allows
journalism.use everyone /journal and /journal help
journalism.reload operators /journal reload
journalism.manage operators Creating, renaming, deleting and editing pages

Getting started

  1. Put the jar in your plugins folder and start the server.
  2. Run /journal. On first start the plugin writes a main menu and an example section with one entry of every type into plugins/Journalism/.
  3. Change the example or make your own pages, by hand or with the commands.
  4. A new section needs a button. Add an item with goto: page/<section> to inventory.yml, then run /journal reload.

Known limitations

  • Everyone sees the same journal. There is no per-player unlocking and no permission per page yet.
  • A sign entry opens on the sign editing screen. Readers can type there, but what they type is thrown away. That screen only shows the 16 basic colors, bold, italic, underlined and strikethrough.
  • Inventory entries are changed in their file, not in game.

Requirements

  • Paper 26.2
  • Java 25

The plugin uses Paper's own API, so it does not run on Spigot or CraftBukkit. Folia is not supported.

Links

Released under the MIT license.

No gallery available for this project.

Version Minecraft Loader Download

v1.0.0 Release :D

v1.0.0

26.2
paper
Download