Developers

Developer API

Hook your own plugins into NovaUI and AuroraWall, and set up PackPilot. Every method, event, command and config key, with short examples.

Plain Bukkit/Paper JavaBukkit eventsCopy-paste examples

NovaUI API

dev.novaui.api.NovaUIAPI · dev.novaui.api.AnimationEndEvent

Getting started

The whole API is one class of static methods, NovaUIAPI, plus one event. There is no instance to fetch: call the methods straight away.

  • Add softdepend: [NovaUI] to your plugin.yml (or depend: [NovaUI] if your plugin can't run without it).
  • Compile against the NovaUI jar as compileOnly: the classes come from NovaUI on the server.
  • Page names are the page file names (pages/<name>.yml). Element ids are the keys under elements in that file.
  • Call every method on the main server thread.
  • Every method is safe to call while NovaUI isn't running (for example without a valid licence): it then does nothing or returns false.
# plugin.yml of your plugin
softdepend: [NovaUI]
import dev.novaui.api.NovaUIAPI;

NovaUIAPI.open(player, "scoreboard");
NovaUIAPI.setVariable(player, "kills", "12");      // use {kills} in any text, value or condition
NovaUIAPI.setText(player, "scoreboard", "title", "<gold>Round 3");

static boolean isAvailable()

True when NovaUI is loaded and running. False while it is off or locked.

if (!NovaUIAPI.isAvailable()) return;

Pages

static boolean open(Player player, String page)

Opens a page for the player. Returns false if there is no such page (or the player is offline). Opening an animation page plays it.

boolean ok = NovaUIAPI.open(player, "hud_stats");

static void close(Player player, String page)

Closes that page for the player.

NovaUIAPI.close(player, "hud_stats");

static void closeAll(Player player)

Closes every page the player has open.

NovaUIAPI.closeAll(player);

static boolean isOpen(Player player, String page)

True if the player has that page open.

if (!NovaUIAPI.isOpen(player, "scoreboard")) NovaUIAPI.open(player, "scoreboard");

static Set<String> openPages(Player player)

The names of the pages the player has open (an empty set when none, or when NovaUI isn't running).

Set<String> open = NovaUIAPI.openPages(player);

static List<String> pages()

All page names.

for (String page : NovaUIAPI.pages()) getLogger().info(page);

Text & variables

static void setText(Player player, String page, String elementId, String text)

Replaces the text of a text element (or the value of a progress element) for this player only. MiniMessage, & codes, {variables} and %placeholders% work. null puts the page's own text back.

NovaUIAPI.setText(player, "scoreboard", "title", "<gold>Round 3");
NovaUIAPI.setText(player, "scoreboard", "title", null);   // back to the page's text

static void setVariable(Player player, String name, String value)

Sets {name} for this player (null removes it). Used in texts, values, player names and conditions.

NovaUIAPI.setVariable(player, "gems", "25000");          // {gems} in any page

static void setVariable(Player player, String name, String value, int ticks)

Sets {name} for this player for a while (ticks, 20 = 1 second). It disappears by itself afterwards.

NovaUIAPI.setVariable(player, "combo", "x3", 60);       // shown for 3 seconds

static String getVariable(Player player, String name)

The player's current value of {name}, or null when it isn't set.

String gems = NovaUIAPI.getVariable(player, "gems");

Animations

static boolean play(Player player, String animation)

Plays an animation page in the middle of the player's screen, on top of the HUD. Playing it again restarts it. Returns false when there is no animation page with that name.

NovaUIAPI.play(player, "anim_title");

static boolean play(Player player, String animation, Runnable onEnd)

Like play(player, animation). onEnd runs on the main thread when the animation ends for any reason: finished, stopped, restarted or the player left. For example: play a fade, then teleport.

NovaUIAPI.play(player, "anim_fade", () -> player.teleport(spawn));   // runs when the animation ends

static void stop(Player player, String animation)

Stops an animation for the player. null stops all of them.

NovaUIAPI.stop(player, null);   // stop every animation

static boolean isPlaying(Player player, String animation)

True while that animation is playing for the player.

if (NovaUIAPI.isPlaying(player, "anim_teleport")) return;

Messages & menus

static void message(Player player, String text, int seconds)

Shows a short message in the event-message bar ({message} in a page, like the shipped example_message page) for the given number of seconds (at least 1). MiniMessage and & codes work.

NovaUIAPI.message(player, "<gold>Boss incoming!", 5);    // the event-message bar

static boolean openMenu(Player player, String menu)

Opens a menu from menus/<name>.yml: a dialog screen for Java players, a form for Bedrock players (Floodgate). Returns false if there is no such menu or the player lacks its permission.

NovaUIAPI.openMenu(player, "profile");

Player info

static boolean isBedrock(Player player)

True for players joining from Bedrock through Geyser + Floodgate. They get the simplified HUD.

if (NovaUIAPI.isBedrock(player)) player.sendMessage("Welcome, Bedrock player!");

static boolean isShown(Player player)

True once the player's client has the HUD pack and the HUD is on screen.

if (NovaUIAPI.isShown(player)) NovaUIAPI.play(player, "anim_title");

AnimationEndEvent

dev.novaui.api.AnimationEndEvent extends Bukkit's PlayerEvent. It fires on the main thread when a NovaUI animation stops showing for a player. It can't be cancelled.

MethodWhat it returns
Player getPlayer()The player the animation played for (from PlayerEvent).
String getAnimation()The animation's page name.
boolean isCompleted()true when it played to the end; false when it was stopped, restarted, or the player left.
static HandlerList getHandlerList()Bukkit's handler list, as on every event.
import dev.novaui.api.AnimationEndEvent;

@EventHandler
public void onAnimationEnd(AnimationEndEvent e) {
    if (e.getAnimation().equals("anim_fade") && e.isCompleted()) {
        e.getPlayer().sendMessage("Welcome to the arena!");
    }
}

AuroraWall API

Storm API · BarrierAPI, IBarrierAPI, IStorm · 3 events

Getting started

Get the API from the static BarrierAPI.getApi(), then ask it for a world's storm (one per world) or a player's storm.

  • Add softdepend: [AuroraWall] to your plugin.yml.
  • Compile against the API classes as compileOnly: they come from AuroraWall at run time.
  • Call it from onEnable or later, on the server thread.
  • getApi() is null while AuroraWall isn't loaded, or when the API is switched off in its config.
  • BarrierAPI.setApi(...) is AuroraWall's own: don't call it.
# plugin.yml of your plugin
softdepend: [AuroraWall]
import gg.lode.barrierapi.BarrierAPI;
import gg.lode.barrierapi.IBarrierAPI;
import gg.lode.barrierapi.IStorm;

IBarrierAPI api = BarrierAPI.getApi();      // null while AuroraWall isn't loaded
if (api == null) return;

IStorm storm = api.getStorm(world);          // the world's storm (one per world)
IStorm mine  = api.getStorm(player);         // the player's storm (see "Who it applies to")
MethodWhat it does
static IBarrierAPI BarrierAPI.getApi()The storm API, or null while AuroraWall isn't loaded.
IStorm getStorm(World world)The world's storm border (one per world).
IStorm getStorm(Player player)The player's storm. In PER_PLAYER mode this is the player's own border.
IStorm is one storm border. A storm only shows once it has a size (a new storm starts at the configured radius, default 100). Time arguments are in seconds: time is how long the change takes; 0, or the overload without time, means at once. The getTicks… methods answer in ticks (20 ticks = 1 second).

IStorm: damage

MethodWhat it does
double getDamage()void setDamage(double damage)Health taken per storm hit.
int getDamageTick()void setDamageTick(int damageTick)Ticks between hits while inside the storm.
int getTicksBeforeDamage()void setTicksBeforeDamage(int ticks)Grace after walking into the storm before the first hit.
void damage(Player player)One storm hit on that player, now (fires PlayerDamageByStormEvent).
boolean isInStorm(Entity entity)True if the entity is outside the safe area (in the storm).
storm.setDamage(1.0);
storm.setDamageTick(20);              // one hit a second
storm.setTicksBeforeDamage(0);
if (storm.isInStorm(player)) player.sendMessage("Get back inside!");

IStorm: position (centre)

MethodWhat it does
double getCurrentX()double getCurrentY()double getCurrentZ()The centre right now (while moving: where it is now).
double getTargetX()double getTargetY()double getTargetZ()Where the centre is heading.
Location getCurrentCenter()Location getTargetCenter()The same as Locations.
void setOrigin(double x, double z)Move the centre at once.
void setOrigin(double x, double z, int time)Move the centre over time seconds.
void setOrigin(double x, double y, double z)void setOrigin(double x, double y, double z, int time)The same with a height (boxed storms).
void setX(double x)void setY(double y)void setZ(double z)Set one coordinate at once.
void moveTo(Location location)void moveTo(Location location, int time)Move the centre to a Location.
void moveUp(double value)void moveUp(double value, int time)Raise a boxed storm.
void moveDown(double value)void moveDown(double value, int time)Lower a boxed storm.
storm.setOrigin(64.5, 64.5);              // centre now
storm.setOrigin(200, -40, 90);            // glide to 200, -40 over 90 seconds
storm.moveTo(arena.getSpawnLocation(), 30);

IStorm: size

MethodWhat it does
double getCurrentRadius()double getTargetRadius()Circle radius (square: half the side).
void setRadius(double radius)void setRadius(int radius)void setRadius(double radius, int time)Resize.
double getCurrentWidth()double getTargetWidth()void setWidth(double width)void setWidth(double width, int time)Square width (x).
double getCurrentLength()double getTargetLength()void setLength(double length)void setLength(double length, int time)Square length (z).
double getCurrentHeight()double getTargetHeight()void setHeight(double height)void setHeight(double height, int time)Boxed storms: floor-to-ceiling height.
void setSize(double size)void setSize(double size, int time)Width = length = size.
void setSize(double width, double length)void setSize(double width, double length, int time)Width and length.
void setSize(double width, double height, double length)void setSize(double width, double height, double length, int time)All three (boxed).
void shrink(double value)void shrink(double value, int time)Radius smaller by value blocks.
void expand(double value)void expand(double value, int time)Radius bigger by value blocks.
void shrinkArea(double value)void shrinkArea(double value, int time)void expandArea(double value)void expandArea(double value, int time)Shrink / grow the area by value.
void shrinkHeight(double value)void shrinkHeight(double value, int time)void expandHeight(double value)void expandHeight(double value, int time)Boxed storms: change the height.
storm.setRadius(1500);                // start size, at once
storm.setRadius(600, 90);             // shrink to 600 over 90 seconds
storm.shrink(50, 20);                 // 50 blocks smaller over 20 seconds

IStorm: movement control

MethodWhat it does
void stop()Freeze: stop moving and resizing where it is now.
void stopMoving()void stopResizing()Stop just one of them.
boolean isMoving()boolean isResizing()Is a move / resize running.
int getTicksToMove()void setTicksToMove(int time)Time left on the current move (set in seconds, read in ticks).
int getTicksToShrink()void setTicksToShrink(int time)Time left on the current resize (set in seconds, read in ticks).
void update()Redraw the walls for everyone now (normally automatic).
if (storm.isResizing()) {
    int secondsLeft = storm.getTicksToShrink() / 20;
}
storm.stop();                         // game over: freeze it

IStorm: look and visibility

MethodWhat it does
Color getColor()void setColor(Color color)The wall's colour (Bukkit Color). Overrides the look's own colour.
StormType getStormType()void setStormType(StormType type)Circle, square, or their boxed versions.
void hideStorm(Player player)void showStorm(Player player)Hide / show the wall for one player. They still take damage.
boolean setStyle(String id)Pick the wall's look. See setStyle.
storm.setStormType(StormType.CIRCLE_BOXED);
storm.setColor(Color.fromRGB(0xFF3030));
storm.hideStorm(spectator);

IStorm: who it applies to

MethodWhat it does
AffectMode getAffectMode()void setAffectMode(AffectMode mode)GLOBAL: one border for the whole world. PER_PLAYER: each player can have their own.

In PER_PLAYER mode, api.getStorm(player) edits that player's own border, which starts as a copy of the world's. Switching back to GLOBAL drops the players' own borders. The /worldborder command only does GLOBAL.

api.getStorm(world).setAffectMode(AffectMode.PER_PLAYER);
api.getStorm(player).setRadius(30, 10);   // only this player's border shrinks

Wall looks: setStyle

AuroraWall walls have looks (Force Field, Stripes, Storm, Fire, Matrix and more). setStyle is on AuroraWall's storm object but not on the IStorm interface, so call it by reflection:

static boolean setStormStyle(IStorm storm, String styleId) {
    try {
        Object ok = storm.getClass().getMethod("setStyle", String.class).invoke(storm, styleId);
        return Boolean.TRUE.equals(ok);
    } catch (ReflectiveOperationException e) {
        return false;            // an older AuroraWall without setStyle
    }
}

setStormStyle(BarrierAPI.getApi().getStorm(world), "forcefield");
  • Returns false if there is no look with that id, the server hides it (hidden-styles), or the licence doesn't include it.
  • setStyle also resets a custom colour: the look's own colours come back.
  • The ids are listed in game with /worldborder styles (the menu) and tab-complete on /worldborder style.

Events

All three are Bukkit events in the same package as the API and fire on the server thread.

PlayerEnterStormEvent

A player went into the storm (left the safe area).

Player getPlayer()Who.
World getWorld()Which world's storm.
int getTicksBeforeDamage()void setTicksBeforeDamage(int ticks)Grace before the first hit; change it for this entry.
boolean isInvulnerable()The player can't take damage right now (e.g. creative).

PlayerLeaveStormEvent

A player came back into the safe area.

Player getPlayer()Who.
World getWorld()Which world's storm.

PlayerDamageByStormEvent Cancellable

The storm is about to hurt a player. Cancel it, or change the damage.

Player getPlayer()Who.
double getDamage()void setDamage(int damage)The damage of this hit. Note that the setter takes an int.
boolean isCancelled()void setCancelled(boolean cancelled)Cancel the hit.
import gg.lode.barrierapi.PlayerDamageByStormEvent;
import gg.lode.barrierapi.PlayerEnterStormEvent;

@EventHandler
public void onStormHit(PlayerDamageByStormEvent e) {
    if (e.getPlayer().hasPermission("game.spectator")) e.setCancelled(true);
}

@EventHandler
public void onEnterStorm(PlayerEnterStormEvent e) {
    e.setTicksBeforeDamage(40);          // 2 seconds of grace for this entry
}

Enums

EnumValues
StormTypeCIRCLE, SQUARE, SQUARE_BOXED, CIRCLE_BOXED (boxed = with a floor and a ceiling).
AffectModeGLOBAL, PER_PLAYER.

Full example: a shrinking game storm

IBarrierAPI api = BarrierAPI.getApi();
if (api == null) { getLogger().warning("AuroraWall is not installed"); return; }

IStorm storm = api.getStorm(gameWorld);
storm.setStormType(StormType.CIRCLE);
storm.setOrigin(64.5, 64.5);          // centre now
storm.setRadius(1500);                // start size, at once
storm.setDamage(1.0);
storm.setDamageTick(20);              // one hit a second
storm.setTicksBeforeDamage(0);
setStormStyle(storm, "storm");        // AuroraWall look (see setStyle)

// later: shrink to 600 around a new centre over 90 seconds
storm.setOrigin(200, -40, 90);
storm.setRadius(600, 90);

// game over: freeze it
storm.stop();

Config keys that affect the API

In plugins/AuroraWall/config.yml.

KeyMeaningDefault
barrier-api.enabledAnswer the storm API at all. Off = getApi() stays null.true
barrier-api.styleThe look of a storm a plugin creates (it can pick another with setStyle).forcefield
barrier-api.radiusA new storm's size before the plugin sets one.100
damage.grace-ticksGrace before the first hit for worlds that set none.0
damage.message"You are in the storm!" on the action bar with each hit.true
should_knockbackshould_allow_totemsshould_subtract_absorptionDamage rules: knockback, totems, absorption.false / true / true
storm_colors.*The wall's colour while it stands still (idle), moves, shrinks, grows, or moves while it grows / shrinks. style = the look's own colour, 'off' = no special colour.idle style, shrinking #FF3030, growing #40FF80
hidden-stylesLooks this server doesn't offer (setStyle refuses them).[]
view-distanceHow near the wall must be to be seen (0 = always).0

Commands, looks and pricing: the AuroraWall page.

PackPilot

Commands & config.yml · no Java API

PackPilot has no Java API: you set it up with plugins/PackPilot/config.yml and run it with /packpilot. What it does is on the PackPilot page.

Commands

/packpilot, aliases /np and /npack. Every sub-command except license needs the permission packpilot.admin (default: op). /packpilot on its own is status.

CommandWhat it doesWho
/packpilot statusHow many packs are in the config, the merged zips (packs, client versions, size, SHA-1, conflicts), whether the pack web server is running and how many downloads it served, and any problems. A player also sees their own version and pack.packpilot.admin
/packpilot conflicts [page]Files that more than one pack has, per version group, 10 a page. The full list is in plugins/PackPilot/output/conflicts.txt.packpilot.admin
/packpilot send <player|all>Sends the pack now. all, * or @a = everyone online. Also sends to players that skip-transferred skipped.packpilot.admin
/packpilot resend [player|all]The same as send, but the player is optional: yourself by default, everyone when typed in the console.packpilot.admin
/packpilot reloadReads config.yml again, downloads and merges the packs, and online players get the new pack. If it fails, the old packs are still served.packpilot.admin
/packpilot generatehashesDownloads every url: pack that has no hash: and writes its SHA-1 into config.yml (your comments are kept). Run /packpilot reload afterwards to use them.packpilot.admin
packpilot license [key]With a key: saves it to config.yml and checks it, no restart needed. Without one: shows the licence status.Console only
While PackPilot has no valid licence it stays switched off, and the commands answer that it is locked and why. It checks the key online when it starts and every 6 hours, and keeps running on the last good check for up to 3 days if the licence server can't be reached.

config.yml

Every pack below is downloaded (url:) or read from disk (file:). All packs a player should get are merged into one zip for their Minecraft version, served from PackPilot's own little web server and sent on join. Change something, then type /packpilot reload.

license:
  key: ""                     # or type "novapack license <key>" in the console

packs:
  example:
    file: packs/example.zip
    priority: 0
    versions: ["1.21.4+"]
  hud:
    url: https://example.com/hud-pack.zip
    hash: ""
    priority: 10

profiles:
  default:
    packs: ["*"]
    required: false
    kick-if-failed: false

hosting:
  mode: selfhost
  selfhost:
    port: 8163
    public-address: ""

packs

Any number of packs, each under its own name. Each one needs either url: or file:.

KeyMeaningDefault
packs.<name>.urlA direct download link. The download is kept in plugins/PackPilot/cache/, so a dead link next time still uses the last copy.–
packs.<name>.fileA .zip or a folder, relative to plugins/PackPilot/ (e.g. packs/mypack.zip or packs/mypack/).–
packs.<name>.hashThe SHA-1 the download must have. A url: pack that doesn't match is refused.""
packs.<name>.priorityHigher wins when two packs have the same file. Same priority: the one lower in the list wins.0
packs.<name>.versionsWhich client versions get this pack. Leave it out for all versions.all

Each versions entry is one of:

"1.21.11"Exactly that version.
"1.21.x"Every 1.21 patch.
"1.21.4+"That version and newer.
"1.21.3-"That version and older.
"1.20.5-1.21.3"A range, both ends included.
">1.21.4""<1.21.4"">=…""<=…"Newer than, older than, and the inclusive versions.

merge

Files with the same path: the higher-priority pack wins (shown in /packpilot conflicts and output/conflicts.txt). These JSON files are joined instead, so packs don't break each other. pack.mcmeta is always merged: every pack's overlays are kept, and the widest format range is written.

KeyMeaningDefault
merge.fontsassets/*/font/*.json: all providers kept (higher pack first, like the game does).true
merge.atlasesassets/*/atlases/*.json: all sources kept.true
merge.soundsassets/*/sounds.json: all sound events; "replace": true is respected.true
merge.langassets/*/lang/*.json: all keys (the higher pack wins a key both have).true
merge.pack-formatpack_format of the merged pack: auto = the newest client version the merged pack is for, or a number.auto
merge.descriptionDescription of the merged pack. Empty = the highest-priority pack's description.""
merge.max-pack-size-mbSafety limit: a pack bigger than this unpacked is refused.512

profiles

A profile is a list of packs, merged into one zip per client version. The first profile without worlds: is used everywhere; a profile with worlds: is used in those worlds, and the pack changes when a player changes world. Without a profiles: section, one default profile gets every pack.

KeyMeaningDefault
profiles.<name>.packsPack names from packs:; "*" = all of them.–
profiles.<name>.requiredtrue = the player must accept the pack; declining kicks them (text: kick-declined in messages.yml).false
profiles.<name>.kick-if-failedtrue = kick when the download still fails after the retries.same as required
profiles.<name>.worldsWorld names this profile is for.–
profiles.<name>.serversA regex on server-name; the profile is ignored on servers that don't match (one shared config for many servers)..*
server-nameThis server's name, for the servers: regex.default
profiles:
  default:
    packs: ["*"]
    required: false
  nether:
    packs: ["example", "nether-sky"]
    worlds: ["world_nether"]
    required: false

hosting

selfhost: PackPilot serves the merged zips itself, nothing else needed. external: you upload plugins/PackPilot/output/<sha1>.zip yourself and players get external.url.

KeyMeaningDefault
hosting.modeselfhost or external.selfhost
hosting.selfhost.portThe port of the pack web server. It must be open to players (a second port from your host, not the Minecraft port).8163
hosting.selfhost.bind-addressThe address the web server listens on.0.0.0.0
hosting.selfhost.public-addressThe address players download from: your public IP or domain (not localhost on a real server). Empty = server-ip from server.properties, or localhost. Behind a reverse proxy, put the full start of the URL here, e.g. https://packs.example.com (then the port is not added).""
hosting.selfhost.threadsDownload threads.4
hosting.selfhost.rate-limit-per-minutehosting.selfhost.rate-limit-burstPer-IP limit against spam: requests a minute, and how many at once.30 / 10
hosting.external.url{sha1} is replaced with the merged pack's SHA-1, e.g. https://cdn.example.com/packs/{sha1}.zip.""
hosting.external.hashLeave empty to use the merged pack's SHA-1. Set it only when the url always points at one fixed file.""
hosting.external.append-hash-to-urlAdds ?hash=<sha1> to the url (for CDNs that cache by url).false

sending & download

KeyMeaningDefault
sending.delay-ticksTicks after joining before the pack is sent (20 = 1 second).20
sending.failed-retriesA failed download is retried this many times before kick-if-failed applies.2
sending.kick-delay-ticksTicks to wait before kicking (0 = at once).0
sending.prompt-timeout-secondsRequired packs: kick when the player hasn't answered the prompt after this many seconds (0 = never).0
sending.skip-bedrockDon't send packs to Bedrock players (Geyser/Floodgate); they can't use Java packs.true
sending.skip-transferredDon't send packs to players who arrived by a transfer packet from your hub. Use it on game servers when the hub already sent the same pack: the client keeps it, so there's no second prompt or reload.false
download.timeout-secondsTimeout for url: pack downloads (at least 5).30
download.max-size-mbLargest url: pack download.256

version-protocols, debug & messages

PackPilot knows Minecraft 1.20 to 1.21.11 (and older majors). A new Minecraft version only needs a line under version-protocols: its protocol number, or its protocol number and resource pack format. Players' versions come from ViaVersion when it is installed; without it everyone counts as the server's version.

version-protocols:
  "26.1": 775            # protocol number
  # "26.1": [775, 80]    # protocol number and resource pack format

debug: false             # log every pack send and answer

Every text players and staff see (the prompt, kick reasons, command replies) is in plugins/PackPilot/messages.yml, written in MiniMessage.