Skip to content

Commit 2d6a2eb

Browse files
committed
Modernize XMas Tree for Paper 26.1.2 / Java 25
- move the project from the legacy deployed build to an actively maintained Paper 26.1.2 / Java 25 Gradle build - simplify the build around the active Paper 26.1.2 target and remove the retired 1.21.11 local server dependency - keep build output clean and predictable in build/libs with the new 2026 versioned jar naming - keep legacy tree data compatible by continuing to read plugins/X-Mas/trees.yml - add world alias migration support so old saved trees can survive renamed worlds - preserve old event data while modernizing the runtime and admin tooling - make /xmastree the primary command - keep /xmas as an optional legacy alias controlled by config - fix legacy alias reload/unregister behavior so reload no longer crashes when alias settings change - improve /xmastree help output and keep it aligned with the actual command surface - add granular permissions under onembxmastree.* - replace the old xmas.admin permission with onembxmastree.admin - add separate permissions for status, help, give, gifts, addhand, reload, debug, debug.toggle, end, and tree.override - add a modern debug system with named categories: status, commands, permissions, placeholders, and config - keep numeric debug pages working as a legacy shortcut - improve debug output formatting with clearer key/value coloring - make invalid debug page/section requests return a helpful response instead of silently falling back - add /xmastree debug toggle <key> true|false for live boolean config changes - keep tab completion focused on named debug categories instead of numeric page suggestions - add optional PlaceholderAPI support with the onembxmastree namespace - add placeholders for event state, end time, end countdown, auto-end, resource-back, particles, luck, tree totals, owner totals, player tree count, and plugin version - document placeholders in the README and show them in debug output - modernize message handling with MiniMessage support while keeping legacy color compatibility - improve player-facing text, prefixes, debug output, and help text - change the visible plugin/chat identity toward XMas Tree for clearer user-facing output - make the Christmas Crystal display name non-italic - fix resource-back so destroying a tree returns only the materials actually spent on that tree - fix the old refund dupe issue where the plugin could return more than the player had used - improve refund delivery with fallback order: chest -> barrel -> player inventory -> floor drops - reduce the loud grow/ingredient sound behavior - make first-hit and repeat-hit grow sound volumes configurable and reloadable - support silent/quiet/loud tuning through config without server restarts - modernize material and item handling for current Paper names - use safer material matching/validation to avoid legacy enum failures - improve displayed item names so materials such as Redstone Dust render properly in requirement output - add configurable per-stage particle effects using modern Paper particle names - harden config and item parsing: restrict present texture URLs to textures.minecraft.net cap Base64 gift payload handling skip invalid or legacy material names safely - update config comments and improve documentation for installation, building, commands, permissions, placeholders, support, and credits - point support to the GitHub issues page - refresh .gitignore for local dev/test folders and obvious OS/build junk i consider this a tested and worth public beta that can be used to figure out any bugs, report them on github as an issue. december is not around the corner, so we have a summer to find issues. Enjoy.
1 parent 221e404 commit 2d6a2eb

7 files changed

Lines changed: 256 additions & 102 deletions

File tree

README.md

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ This fork keeps the old X-Mas event data usable for winter 2026 while moving the
66

77
![X-Mas tree preview](http://puu.sh/dKlK1/85c3dad454.jpg)
88

9-
## Current targets
9+
## Current target
1010

11-
The Gradle build creates the legacy reference jar and the current Paper 26.1.2 target jar in `build/libs`:
11+
The Gradle build creates the current Paper 26.1.2 target jar in `build/libs`:
1212

1313
| Jar | Purpose |
1414
| --- | --- |
15-
| `1MB-XMas-2026-v2.0.0-004-v21-1.21.8.jar` | Legacy reference jar copied from the deployed 2025 server jar. |
16-
| `1MB-XMas-2026-v2.0.1-011-v25-26.1.2.jar` | Modern Paper 26.1.2 build, Java 25 bytecode. |
15+
| `1MB-XMas-2026-v2.0.1-021-v25-26.1.2.jar` | Modern Paper 26.1.2 build, Java 25 bytecode. |
1716

18-
The checked-in source targets Paper 26.1.2. The legacy jar is preserved so the deployed working 2025 behavior can be compared or rolled back during testing.
17+
The checked-in source targets Paper 26.1.2 only.
1918

2019
## Features
2120

@@ -28,7 +27,7 @@ The checked-in source targets Paper 26.1.2. The legacy jar is preserved so the d
2827
- Existing `plugins/X-Mas/trees.yml` data remains the event data source.
2928
- Optional resource refunds when a tree is destroyed or cleaned up after the event.
3029
- Configurable per-stage particles using Paper 26.1.2 particle names.
31-
- `/xmastree debug` pages for status, commands, permissions, placeholders, and global boolean toggles.
30+
- `/xmastree debug` sections for `status`, `commands`, `permissions`, `placeholders`, and `config`, plus live global boolean toggles.
3231
- Primary `/xmastree` command with an optional legacy `/xmas` alias.
3332
- Optional PlaceholderAPI placeholders for CMI holograms, ajLeaderboards, scoreboards, and menus.
3433
- Legacy `trees.yml` world-name alias support for renamed destination worlds.
@@ -44,7 +43,7 @@ The checked-in source targets Paper 26.1.2. The legacy jar is preserved so the d
4443

4544
For the 2026 target, use the modern Paper 26.1.2 jar:
4645

47-
- Paper 26.1.2: `1MB-XMas-2026-v2.0.1-011-v25-26.1.2.jar`
46+
- Paper 26.1.2: `1MB-XMas-2026-v2.0.1-021-v25-26.1.2.jar`
4847

4948
## Building
5049

@@ -54,9 +53,8 @@ Requirements:
5453
- Gradle
5554
- The current local dev/test setup in this repo uses `servers/Server-Two-Paper-26.1.2` for Paper API jars and local smoke testing
5655
- The current local dev/test setup in this repo uses `servers/Server-Two-Paper-26.1.2/plugins/PlaceholderAPI-2.12.3-DEV-265.jar` for the optional PlaceholderAPI compile-time classpath
57-
- The deployed legacy jar in `servers/Server-One-Paper-1.21.11/plugins` is only needed if you want the `legacyJar` copy task
5856

59-
Build the current Paper 26.1.2 jar and the legacy reference jar:
57+
Build the current Paper 26.1.2 jar:
6058

6159
```bash
6260
gradle clean buildAllJars
@@ -74,12 +72,6 @@ The `paper2612Jar` task is kept as an alias:
7472
gradle paper2612Jar
7573
```
7674

77-
Copy the deployed legacy jar into the requested legacy filename:
78-
79-
```bash
80-
gradle legacyJar
81-
```
82-
8375
End users do not need the `servers/` folder. The build output jars are written to `build/libs/`, and those are the files you install on a Paper server.
8476

8577
In this workspace, the current Gradle setup compiles against the Paper 26.1.2 API jars found in `servers/Server-Two-Paper-26.1.2`. If that folder is missing or has not been started far enough for Paper to download its libraries, Gradle will not have the local Paper API classpath it currently expects.
@@ -98,10 +90,44 @@ If `core.commands.legacy-command-enabled` is `true`, the legacy `/xmas` alias is
9890
| `/xmastree gifts` | Spawns a small batch of presents under every loaded Christmas tree. |
9991
| `/xmastree addhand` | Adds the item in your main hand to the gift list and saves it to `config.yml`. |
10092
| `/xmastree reload` | Reloads config, locale, present heads, gifts, luck settings, command alias settings, and tree level requirements. |
101-
| `/xmastree debug [page]` | Shows paginated status, commands, permissions, placeholders, and toggleable global config keys. |
93+
| `/xmastree debug` | Opens the `status` debug section by default. |
94+
| `/xmastree debug [section\|page]` | Shows debug output for `status`, `commands`, `permissions`, `placeholders`, or `config`. Numeric pages `1-5` still work as a legacy shortcut. |
10295
| `/xmastree debug toggle <key> true\|false` | Toggles supported global boolean config keys and reloads the plugin config. |
10396
| `/xmastree end` | Ends the event and sets `core.plugin-enabled` to `false`. |
10497

98+
### Debug sections
99+
100+
The preferred debug syntax is category-based:
101+
102+
| Section | Example | Purpose |
103+
| --- | --- | --- |
104+
| `status` | `/xmastree debug status` | Event state, end date, auto-end, refund state, particles, loaded tree count, and owner count. |
105+
| `commands` | `/xmastree debug commands` | Command list, debug syntax, and legacy alias state. |
106+
| `permissions` | `/xmastree debug permissions` | All registered `onembxmastree.*` permissions and what they allow. |
107+
| `placeholders` | `/xmastree debug placeholders` | All built-in PlaceholderAPI placeholders plus their descriptions. |
108+
| `config` | `/xmastree debug config` | The current values of the toggleable global config keys. |
109+
110+
Numeric compatibility remains available for existing habits and old screenshots:
111+
112+
| Page | Section |
113+
| --- | --- |
114+
| `1` | `status` |
115+
| `2` | `commands` |
116+
| `3` | `permissions` |
117+
| `4` | `placeholders` |
118+
| `5` | `config` |
119+
120+
### Debug toggle keys
121+
122+
`/xmastree debug toggle <key> true|false` currently supports:
123+
124+
- `core.commands.legacy-command-enabled`
125+
- `core.plugin-enabled`
126+
- `core.holiday-ends.enabled`
127+
- `core.holiday-ends.resource-back`
128+
- `core.particles-enabled`
129+
- `xmas.luck.enabled`
130+
105131
## Permissions
106132

107133
| Permission | Default | Description |
@@ -113,7 +139,7 @@ If `core.commands.legacy-command-enabled` is `true`, the legacy `/xmas` alias is
113139
| `onembxmastree.command.gifts` | `op` | Allows `/xmastree gifts`. |
114140
| `onembxmastree.command.addhand` | `op` | Allows `/xmastree addhand`. |
115141
| `onembxmastree.command.reload` | `op` | Allows `/xmastree reload`. |
116-
| `onembxmastree.command.debug` | `op` | Allows `/xmastree debug [page]`. |
142+
| `onembxmastree.command.debug` | `op` | Allows `/xmastree debug [section\|page]`. |
117143
| `onembxmastree.command.debug.toggle` | `op` | Allows `/xmastree debug toggle <key> true\|false`. |
118144
| `onembxmastree.command.end` | `op` | Allows `/xmastree end`. |
119145
| `onembxmastree.tree.override` | `op` | Allows managing other players' trees. |
@@ -211,7 +237,7 @@ The dotted key after `onembxmastree_` is supported to keep the placeholders read
211237
| `%onembxmastree_trees.total%` | `14` | Total loaded X-Mas trees. |
212238
| `%onembxmastree_trees.owners%` | `6` | Number of unique loaded tree owners. |
213239
| `%onembxmastree_player.trees%` | `2` | Number of loaded trees owned by the placeholder player. |
214-
| `%onembxmastree_version%` | `2.0.1-011` | Loaded plugin version. |
240+
| `%onembxmastree_version%` | `2.0.1-021` | Loaded plugin version. |
215241

216242
CMI hologram example:
217243

build.gradle

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@ plugins {
33
}
44

55
group = 'com.onemb.xmas'
6-
version = '2.0.1-011'
6+
version = '2.0.1-021'
7+
def paper2612ArchiveName = '1MB-XMas-2026-v2.0.1-021-v25-26.1.2.jar'
78

8-
def legacyArchiveName = '1MB-XMas-2026-v2.0.0-004-v21-1.21.8.jar'
9-
def paper2612ArchiveName = '1MB-XMas-2026-v2.0.1-011-v25-26.1.2.jar'
10-
11-
def serverOne = layout.projectDirectory.dir('servers/Server-One-Paper-1.21.11')
129
def serverTwo = layout.projectDirectory.dir('servers/Server-Two-Paper-26.1.2')
13-
def legacyServerJar = serverOne.file('plugins/1MB-X-Mas_2025-1.21.8.jar')
1410
def placeholderApiJar = serverTwo.file('plugins/PlaceholderAPI-2.12.3-DEV-265.jar')
1511

1612
def paper2612Api = serverTwo.file('libraries/io/papermc/paper/paper-api/26.1.2.build.18-alpha/paper-api-26.1.2.build.18-alpha.jar')
@@ -50,20 +46,12 @@ tasks.register('paper2612Jar') {
5046
dependsOn tasks.named('jar')
5147
}
5248

53-
tasks.register('legacyJar', Copy) {
54-
description = 'Copies the deployed legacy jar into the requested 2026 legacy filename.'
55-
group = 'build'
56-
from(legacyServerJar)
57-
into(layout.buildDirectory.dir('libs'))
58-
rename { legacyArchiveName }
59-
}
60-
6149
tasks.register('buildAllJars') {
62-
description = 'Builds the legacy reference jar plus the modern Paper 26.1.2 target jar.'
50+
description = 'Builds the current Paper 26.1.2 target jar.'
6351
group = 'build'
64-
dependsOn tasks.named('legacyJar'), tasks.named('jar')
52+
dependsOn tasks.named('jar')
6553
}
6654

6755
tasks.named('assemble') {
68-
dependsOn tasks.named('legacyJar'), tasks.named('paper2612Jar')
56+
dependsOn tasks.named('paper2612Jar')
6957
}

0 commit comments

Comments
 (0)