-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/some new nice to have things #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
twisti-dev
merged 7 commits into
version/1.21.11
from
feat/some-new-nice-to-have-things
Mar 16, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9250db7
feat: add action bar support and new packet sending utilities
TheBjoRedCraft 85d3475
chore: bump version to 1.21.11-2.67.1 in gradle.properties
TheBjoRedCraft c4b38f6
Potential fix for pull request finding
TheBjoRedCraft 002924b
Potential fix for pull request finding
TheBjoRedCraft 44c9a5b
feat: enhance packet sending utilities with UUID support and improve …
twisti-dev ef2c591
Update ABI reference
twisti-dev ed01f8a
chore: bump version to 1.21.11-2.68.0 in gradle.properties
twisti-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
25 changes: 24 additions & 1 deletion
25
...f-api-core-api/src/main/kotlin/dev/slne/surf/surfapi/core/api/extensions/packet-events.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,28 @@ | ||
| package dev.slne.surf.surfapi.core.api.extensions | ||
|
|
||
| import com.github.retrooper.packetevents.PacketEvents | ||
| import com.github.retrooper.packetevents.wrapper.PacketWrapper | ||
| import dev.slne.surf.surfapi.core.api.surfCoreApi | ||
| import java.util.* | ||
|
|
||
| val packetEvents get() = PacketEvents.getAPI() ?: error("PacketEvents API is not yet initialized") | ||
| val packetEvents get() = PacketEvents.getAPI() ?: error("PacketEvents API is not yet initialized") | ||
|
|
||
| /** | ||
| * Sends the current packet to the player associated with the provided UUID. | ||
| * If no player is found for the specified UUID, the method returns without performing any action. | ||
| * | ||
| * @param uuid the UUID of the player to whom the packet will be sent | ||
| */ | ||
| fun PacketWrapper<*>.sendPacket(uuid: UUID) { | ||
| val player = surfCoreApi.getPlayer(uuid) ?: return | ||
| sendPacket(player) | ||
| } | ||
|
|
||
| /** | ||
| * Sends the current packet to the specified player. | ||
| * | ||
| * @param player the platform-specific player object to whom the packet will be sent | ||
| */ | ||
| fun PacketWrapper<*>.sendPacket(player: Any) { | ||
| packetEvents.playerManager.sendPacket(player, this) | ||
| } |
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.