Skip to content

Merge Dev to Master and update to 1.5.1#9

Merged
EasterGhost merged 5 commits intomasterfrom
dev
Mar 24, 2026
Merged

Merge Dev to Master and update to 1.5.1#9
EasterGhost merged 5 commits intomasterfrom
dev

Conversation

@EasterGhost
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 24, 2026 17:10
@EasterGhost EasterGhost merged commit d2d399c into master Mar 24, 2026
3 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Teleport Commands Fabric to v1.5.1 and refactors command/UI plumbing to support paginated homes/warps output with reusable helpers, while also switching Fabric command registration away from a Commands mixin.

Changes:

  • Bump mod version to 1.5.1 (Gradle + in-mod constant).
  • Replace CommandsMixin command registration with Fabric CommandRegistrationCallback.
  • Add pagination UI + page picker flow for homes and warps, plus shared helpers for pagination, UI rendering, command execution, and suggestions.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main/resources/teleportcommandsfabric.mixins.json Removes CommandsMixin from mixin config after moving to Fabric command callback.
src/main/resources/assets/teleport_commands_fabric/lang/en_us.json Adds pagination + list title translation keys for new UI.
src/main/resources/assets/teleport_commands_fabric/lang/zh_cn.json Adds Chinese translations for the new pagination + title keys.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/services/RtpService.java Switches job map implementation (ConcurrentHashMap → HashMap).
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/mixin/client/ClientPlayNetworkHandlerMixin.java Expands trusted commands for unattended command sending (homes/warps).
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/mixin/CommandsMixin.java Deleted; command registration no longer uses a mixin into Commands.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/warp/warp.java Adds warps <page> and a page-picker command; supports page-aware silent map visibility toggles.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/warp/WarpVisibilityActions.java Refreshes warps output using page 1 after visibility changes; adds page-aware silent update helper.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/warp/WarpSuggestionProvider.java Refactors suggestion generation to shared SuggestionCommandSupport.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/warp/WarpMessages.java Refactors execution + messaging to shared CommandExecutionSupport; adds invalid-page messaging.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/warp/WarpFormatter.java Reworks warps list output into paginated UI with navigation + page picker.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/warp/WarpCommandSupport.java Introduces page-aware listing and page picker rendering via PagedListCommandSupport.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/warp/WarpAdminFormatter.java Refactors admin warp map list formatting to shared UI helpers.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/tpa/TpaSuggestionProvider.java Refactors suggestions to shared SuggestionCommandSupport.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/home/home.java Adds homes <page> and a page-picker command; supports page-aware silent map visibility toggles.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/home/HomeVisibilityActions.java Adds page-aware silent update helper that re-renders the current page.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/home/HomeSuggestionProvider.java Refactors suggestions to shared SuggestionCommandSupport.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/home/HomeMessages.java Refactors execution + messaging to shared CommandExecutionSupport; adds invalid-page messaging.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/home/HomeFormatter.java Reworks homes list output into paginated UI with navigation + page picker.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/home/HomeCommandSupport.java Introduces page-aware listing and page picker rendering via PagedListCommandSupport.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/common/SuggestionCommandSupport.java New shared helper for Brigadier suggestions with centralized error handling.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/common/PaginationCommandSupport.java New shared pagination math + UI components (header/navigation/page picker).
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/common/PagedListCommandSupport.java New shared helper to render paginated lists + page pickers with validation hooks.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/common/CommandUiSupport.java New shared helper for consistent command UI lines/buttons and copy-to-clipboard hover behavior.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/commands/common/CommandExecutionSupport.java New shared helper for standardized error handling and common messages (incl. invalid page).
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/TeleportCommands.java Registers commands via Fabric CommandRegistrationCallback; clears SERVER on stop.
src/main/java/org/AndrewElizabeth/teleportcommandsfabric/Constants.java Bumps in-mod version string to 1.5.1.
gradle.properties Bumps mod_version to 1.5.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

() -> HomeCommandSupport.withPlayerStorage(player,
playerStorage -> HomeCommandSupport.printHomes(player, playerStorage)));
})
.then(Commands.argument("page", IntegerArgumentType.integer())
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new "page" arguments accept any integer (including 0/negative). Consider using IntegerArgumentType.integer(1) for page parameters (including the other page arguments in this file) so invalid values are rejected by Brigadier before execution, instead of relying on runtime invalid-page handling.

Suggested change
.then(Commands.argument("page", IntegerArgumentType.integer())
.then(Commands.argument("page", IntegerArgumentType.integer(1))

Copilot uses AI. Check for mistakes.
Comment on lines +128 to +132
.then(Commands.argument("page", IntegerArgumentType.integer())
.executes(context -> {
final ServerPlayer player = context.getSource().getPlayerOrException();
final int page = IntegerArgumentType.getInteger(context, "page");

Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new "page" arguments accept any integer (including 0/negative). Consider using IntegerArgumentType.integer(1) for page parameters (including the other page arguments in this file) so invalid values are rejected by Brigadier before execution, instead of relying on runtime invalid-page handling.

Copilot uses AI. Check for mistakes.
Comment on lines +149 to +156
"commands.teleport_commands.common.page": "Page %0%/%1%",
"commands.teleport_commands.common.first": "[<< First]",
"commands.teleport_commands.common.prev": "[< Prev]",
"commands.teleport_commands.common.jump": "[Jump]",
"commands.teleport_commands.common.next": "[Next >]",
"commands.teleport_commands.common.last": "[Last >>]",
"commands.teleport_commands.common.pagePickerTitle": "%0% pages (%1%/%2%)",
"commands.teleport_commands.common.invalidPage": "Invalid page %0%. Valid pages: 1-%1%."
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pagination introduced several new translation keys (page/navigation/page picker). Only en_us and zh_cn were updated in this PR; other locale files will fall back to en_us for these keys. If you want complete localization, consider adding these keys to the remaining lang/*.json files as well.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants