Fix teleport UnsupportedOperationException on Folia/Canvas#234
Open
WhiteProject1 wants to merge 17 commits intoMaxlego08:developfrom
Open
Fix teleport UnsupportedOperationException on Folia/Canvas#234WhiteProject1 wants to merge 17 commits intoMaxlego08:developfrom
WhiteProject1 wants to merge 17 commits intoMaxlego08:developfrom
Conversation
Enhanced debug logging and override logic in TeleportationModule for random teleportation, including better handling of void worlds and location validation. Optimized YamlLoader to support direct loading of Map<String, String> fields from configuration sections.
Added checks to ensure both users are online and have valid player objects before proceeding with teleportation in ZTeleportRequest and ZTeleportHereRequest. This prevents errors and improves stability when handling teleport requests.
Eliminated debug log statements throughout the TeleportationModule to improve performance and reduce console clutter. Debug logging can be re-enabled via configuration if needed.
Replaced several HashMap and HashSet usages with ConcurrentHashMap and thread-safe sets for better concurrency in command, storage, and utility classes. Added null checks and error logging in SanctionModule and VaultItemRepository to prevent potential runtime exceptions. Improved command extraction safety in PlayerListener and enhanced logging in TeleportationModule for chunk loading failures.
Teleportation to spawn on first join now waits for the player to be fully loaded in the chunk loader (Folia) by scheduling the teleport 2 ticks later. This ensures the player is online and avoids potential issues with chunk loading.
Added URL and changed seconds to long in VoteSiteConfiguration. Improved vote site configuration loading and reset scheduling in VoteModule, including safer monthly scheduling and async vote updates with error handling. Fixed typo in PlayerListener (cancelGoldEvent to cancelGodEvent), ensured playtime insertion runs asynchronously, and added online check before scheduling flight on login.
Introduces a comprehensive player trading feature, including trade request, accept, and deny commands, trade events, and a configurable trade GUI. Adds TradeManager, TradeModule, inventory handling, event listeners, and configuration for slots, items, and messages. Updates permissions and messages to support trading functionality.
TradeModule now sets custom model data on item meta if the 'custom-model-data' field is present in the configuration section. This allows for more flexible item customization in trades.
ExpiringCache now supports soft expiration: entries are asynchronously refreshed when soft-expired, but the old value is returned until hard expiration. This improves cache responsiveness and reduces blocking on cache misses.
Introduces a SimpleCache for item retrieval to improve performance when no replacements are needed. Refactors item meta handling by separating raw item loading and meta updates, and adds support for custom model data in item configuration.
Introduces cross-server teleportation via Redis and BungeeCord/Velocity, including new API interfaces, message classes, and configuration options. Implements Redis-based server for handling cross-server player transfers and teleport requests, with listener for pending teleports. Optimizes several hot-paths for performance and updates configuration files to support new features.
Replace direct player.teleport() calls with plugin.getScheduler().teleportAsync() in SpawnModule, CommandTop, and CommandBottom to support region threading.
Owner
|
Plz on develop branch |
Owner
|
You need to resolve conflicts plz |
- Migrate package imports from fr.maxlego08.menu.zcore to fr.maxlego08.menu.common - Update Button API: getCustomItemStack(Player) -> getCustomItemStack(Player, boolean, Placeholders) - Add missing TradeRequest class and TradeManager methods - Add SimpleCache.clear() and ZModule.onDisable() methods - Bump version to 1.0.3.5
Add null checks after createHologram() to gracefully handle cases where the server NMS version is not supported (e.g. 1.21.11 without a matching CraftHologram implementation).
On Canvas/Folia, teleportAsync during PlayerJoinEvent fires before the player entity is fully registered in the chunk system. Wrap the call in runAtEntityLater to defer it by one tick.
Port NMS module to 1.21.11 API with updated ServerEntity constructor signature and CraftBlockType block lookup replacing ResourceLocation.
Owner
|
I’ll let you notify me on Discord when your PR is finished for the merge! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
player.teleport()calls withplugin.getScheduler().teleportAsync()in SpawnModule, CommandTop, and CommandBottomUnsupportedOperationException: Must use teleportAsync while in region threadingon Canvas/Folia serversTest plan
teleportAtSpawnOnJoinenabled/topand/bottomcommands