|
| 1 | +# API Reference |
| 2 | + |
| 3 | +## Entry Point: `DisplayAPI` |
| 4 | + |
| 5 | +All API access starts from the static `DisplayAPI` class. |
| 6 | + |
| 7 | +### Factory Methods |
| 8 | + |
| 9 | +```java |
| 10 | +DisplayAPI.text(Location) → TextDisplayBuilder |
| 11 | +DisplayAPI.block(Location) → BlockDisplayBuilder |
| 12 | +DisplayAPI.item(Location) → ItemDisplayBuilder |
| 13 | +DisplayAPI.popup(Location) → PopupBuilder |
| 14 | +DisplayAPI.interactive(Location) → InteractiveBuilder |
| 15 | +DisplayAPI.animate(SpawnedDisplay) → AnimationBuilder |
| 16 | +DisplayAPI.follow(SpawnedDisplay, Entity) → FollowDisplay |
| 17 | +DisplayAPI.leaderboard(Location) → Leaderboard |
| 18 | +DisplayAPI.group(String id, Location) → DisplayGroup |
| 19 | +``` |
| 20 | + |
| 21 | +### Management |
| 22 | + |
| 23 | +```java |
| 24 | +DisplayAPI.getById(String id) → SpawnedDisplay |
| 25 | +DisplayAPI.remove(String id) → void |
| 26 | +DisplayAPI.removeAll() → void |
| 27 | +DisplayAPI.getManager() → DisplayManager |
| 28 | +DisplayAPI.getPersistenceManager() → PersistenceManager |
| 29 | +DisplayAPI.getPlugin() → Plugin |
| 30 | +DisplayAPI.getDefaultViewRange() → float |
| 31 | +``` |
| 32 | + |
| 33 | +## Class Overview |
| 34 | + |
| 35 | +### Builders (`com.wjddusrb03.displayapi.builder`) |
| 36 | + |
| 37 | +| Class | Description | |
| 38 | +|-------|-------------| |
| 39 | +| `AbstractDisplayBuilder<T>` | Base builder with common properties | |
| 40 | +| `TextDisplayBuilder` | Text hologram builder | |
| 41 | +| `BlockDisplayBuilder` | Block display builder | |
| 42 | +| `ItemDisplayBuilder` | Item display builder | |
| 43 | +| `PopupBuilder` | Animated popup builder | |
| 44 | +| `InteractiveBuilder` | Clickable display builder | |
| 45 | + |
| 46 | +### Display (`com.wjddusrb03.displayapi.display`) |
| 47 | + |
| 48 | +| Class | Description | |
| 49 | +|-------|-------------| |
| 50 | +| `SpawnedDisplay` | Wrapper around a spawned Display entity | |
| 51 | +| `DisplayGroup` | Groups multiple displays | |
| 52 | +| `InteractiveDisplay` | Display + Interaction entity pair | |
| 53 | +| `FollowDisplay` | Display that follows an entity | |
| 54 | +| `Leaderboard` | Auto-updating ranked display | |
| 55 | + |
| 56 | +### Animation (`com.wjddusrb03.displayapi.animation`) |
| 57 | + |
| 58 | +| Class | Description | |
| 59 | +|-------|-------------| |
| 60 | +| `AnimationBuilder` | Builder for animations (presets + custom) | |
| 61 | +| `DisplayAnimation` | Running animation controller | |
| 62 | +| `Keyframe` | Single animation keyframe | |
| 63 | +| `Easing` | 12 easing function enum | |
| 64 | + |
| 65 | +### Manager (`com.wjddusrb03.displayapi.manager`) |
| 66 | + |
| 67 | +| Class | Description | |
| 68 | +|-------|-------------| |
| 69 | +| `DisplayManager` | Tracks all active displays, groups, interactives | |
| 70 | +| `PersistenceManager` | YAML save/load for persistent displays | |
| 71 | + |
| 72 | +### Utility (`com.wjddusrb03.displayapi.util`) |
| 73 | + |
| 74 | +| Class | Description | |
| 75 | +|-------|-------------| |
| 76 | +| `PlaceholderUtil` | Safe PlaceholderAPI integration | |
| 77 | + |
| 78 | +### Listener (`com.wjddusrb03.displayapi.listener`) |
| 79 | + |
| 80 | +| Class | Description | |
| 81 | +|-------|-------------| |
| 82 | +| `DisplayListener` | Per-player visibility on join | |
| 83 | +| `InteractionListener` | Routes click events to InteractiveDisplay | |
| 84 | + |
| 85 | +## Package Structure |
| 86 | + |
| 87 | +``` |
| 88 | +com.wjddusrb03.displayapi |
| 89 | +├── DisplayAPI.java (static entry point) |
| 90 | +├── DisplayAPIPlugin.java (plugin main class) |
| 91 | +├── builder/ |
| 92 | +│ ├── AbstractDisplayBuilder (base builder) |
| 93 | +│ ├── TextDisplayBuilder |
| 94 | +│ ├── BlockDisplayBuilder |
| 95 | +│ ├── ItemDisplayBuilder |
| 96 | +│ ├── PopupBuilder |
| 97 | +│ └── InteractiveBuilder |
| 98 | +├── display/ |
| 99 | +│ ├── SpawnedDisplay (spawned entity wrapper) |
| 100 | +│ ├── DisplayGroup (group management) |
| 101 | +│ ├── InteractiveDisplay (click detection) |
| 102 | +│ ├── FollowDisplay (entity tracking) |
| 103 | +│ └── Leaderboard (ranked display) |
| 104 | +├── animation/ |
| 105 | +│ ├── AnimationBuilder (animation factory) |
| 106 | +│ ├── DisplayAnimation (animation runner) |
| 107 | +│ ├── Keyframe (animation data) |
| 108 | +│ └── Easing (12 easing curves) |
| 109 | +├── manager/ |
| 110 | +│ ├── DisplayManager (display tracking) |
| 111 | +│ └── PersistenceManager (YAML persistence) |
| 112 | +├── listener/ |
| 113 | +│ ├── DisplayListener (visibility events) |
| 114 | +│ └── InteractionListener (click events) |
| 115 | +├── util/ |
| 116 | +│ └── PlaceholderUtil (PlaceholderAPI) |
| 117 | +└── command/ |
| 118 | + └── DisplayAPICommand (admin commands) |
| 119 | +``` |
0 commit comments