add-placeholder

Installation
SKILL.md

add-placeholder

Critical

  • Only edit one file: core/src/main/java/dev/colocated/litebansdiscordbridge/util/PlaceholderReplacer.java
  • Never break the null-guard at the top of replace() — if (text == null || entry == null) return text; must stay first.
  • All fallback strings must be non-null literals ("Unknown", "Never", "No reason specified", etc.) — never null.
  • Do not add imports that aren't already present unless a new helper method requires one.

Instructions

  1. Read the file core/src/main/java/dev/colocated/litebansdiscordbridge/util/PlaceholderReplacer.java in full. Verify replace(String text, Entry entry, PlatformAdapter platform) is the method you will modify before proceeding.

  2. Determine which pattern fits the new placeholder:

    • Simple (direct Entry getter, cheap): add a .replace("%name%", entry.getX() != null ? entry.getX() : "Fallback") line inside the existing chained block (lines ~51–67).
    • Expensive or needs helper (e.g., async lookup, formatting, parsing): add a text.contains("%name%") guard block after the chained block, calling a new private static helper method.
Installs
1
First Seen
Jun 16, 2026