Skip to content
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

Fix CraftBukkitFacet on 1.20.2 #140

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

56738
Copy link
Contributor

@56738 56738 commented Sep 27, 2023

In 1.20.2, send(Packet) was moved from ServerGamePacketListenerImpl to its new superclass ServerCommonPacketListenerImpl.

Because getDeclaredMethods doesn't return methods defined in superclasses, CraftBukkitFacet didn't work at all.
Changed MinecraftReflection#searchMethod to use getMethods instead of getDeclaredMethods.

@Machine-Maker
Copy link
Member

I don't think this is a correct fix. getMethods only return the public methods which might break other things. I think a better fix would be to change the class that is being used to find the method to the common packet listener.

@56738
Copy link
Contributor Author

56738 commented Sep 27, 2023

I don't think this is a correct fix. getMethods only return the public methods which might break other things. I think a better fix would be to change the class that is being used to find the method to the common packet listener.

Replaced the fix with your suggested one: If ServerCommonPacketListenerImpl exists, the method is searched in that class instead.

@Machine-Maker Machine-Maker merged commit d0f67da into KyoriPowered:master Sep 29, 2023
3 checks passed
rainbowdashlabs referenced this pull request in eldoriarpg/survivalschematicbrush Oct 24, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[net.kyori:adventure-platform-bukkit](https://togithub.com/KyoriPowered/adventure-platform)
| `4.3.0` -> `4.3.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/net.kyori:adventure-platform-bukkit/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/net.kyori:adventure-platform-bukkit/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/net.kyori:adventure-platform-bukkit/4.3.0/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/net.kyori:adventure-platform-bukkit/4.3.0/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>KyoriPowered/adventure-platform
(net.kyori:adventure-platform-bukkit)</summary>

###
[`v4.3.1`](https://togithub.com/KyoriPowered/adventure-platform/releases/tag/v4.3.1)

This is a bugfix release to add support for Minecraft 1.20.2 on the
Bukkit platform.

#### What's Changed

- Fix CraftBukkitFacet on 1.20.2 by
[@&#8203;56738](https://togithub.com/56738) in
[https://github.com/KyoriPowered/adventure-platform/pull/140](https://togithub.com/KyoriPowered/adventure-platform/pull/140)

#### New Contributors

- [@&#8203;56738](https://togithub.com/56738) made their first
contribution in
[https://github.com/KyoriPowered/adventure-platform/pull/140](https://togithub.com/KyoriPowered/adventure-platform/pull/140)

**Full Changelog**:
KyoriPowered/adventure-platform@v4.3.0...v4.3.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/eldoriarpg/survivalschematicbrush).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS4yIiwidXBkYXRlZEluVmVyIjoiMzcuMzEuMiIsInRhcmdldEJyYW5jaCI6ImRldiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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