8000 Use Pooled ByteBuffer in SpigotReflectionUtil#decodeBukkitItemStack by MachineBreaker · Pull Request #557 · retrooper/packetevents · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use Pooled ByteBuffer in SpigotReflectionUtil#decodeBukkitItemStack #557

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

Closed
wants to merge 136 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
4887d04
Update README.md
retrooper Aug 14, 2021
b956ca9
Hopefully minimized some bugs for ServerUtils#getEntityById
retrooper Aug 18, 2021
d01fdce
ServerUtils#getEntityById bug fixes
retrooper Aug 19, 2021
8f56603
Removed gradle build files, IDE files, and plugin.yml
retrooper Aug 22, 2021
51af277
Netty channels are now acessible in the NMSPacketEvents
retrooper Aug 23, 2021
7f655ad
Created constructor for WrappedPacketLoginOutCustomPayload
retrooper Aug 24, 2021
9172cd3
Fixed legacy viaversion api accessor
retrooper Aug 31, 2021
0595fb6
Merge pull request #160 from retrooper/dev
retrooper Aug 31, 2021
9f265ef
Fixed cancelling event logic in listeners.
retrooper Sep 10, 2021
1ac55ff
1.8-pre-18 update
retrooper Sep 10, 2021
934d537
If a version lookup failed, try to resolve the client version again
MWHunter Sep 16, 2021
7350520
Use bitsets for WrappedPacketOutMapChunk
MWHunter Sep 20, 2021
91916d0
Clean up WrappedPacketOutMapChunk
MWHunter Sep 20, 2021
5d1371c
Optimize ServerVersion
MWHunter Sep 21, 2021
52e7385
Fix WrappedPacketOutSetCooldown
MWHunter Sep 25, 2021
f54b8d7
We now read the channel in network manager correctly
retrooper Sep 26, 2021
1ea4880
Merge remote-tracking branch 'origin/dev' into dev
retrooper Sep 26, 2021
8336017
Fix cloning vectors
MWHunter Sep 29, 2021
9c2609f
Vector3f should return Vector3f when cloned
MWHunter Sep 29, 2021
db1c913
Fixed WrappedPacketOutWindowItems for 1.17
retrooper Oct 3, 2021
75512ad
Fixed WrappedPacketOutWindowItems for 1.17.1
retrooper Oct 9, 2021
cb1438c
Fixed WrappedPacketOutEntityVelocity#setVelocity
retrooper Oct 10, 2021
9d98af5
Data watcher takes NMS entity as argument, not bukkit entity
MWHunter Oct 14, 2021
362d021
Partially revert https://github.com/retrooper/packetevents/commit/5d1…
MWHunter Oct 15, 2021
35bd312
Try to fix build by updating geyser connector
MWHunter Oct 23, 2021
a94e72c
Revert to previous geyser api version
MWHunter Oct 23, 2021
1d31e06
Merge pull request #169 from retrooper/MWHunter-patch-1
MWHunter Oct 23, 2021
9f8a14b
Added methods to unregister PacketListenerAbstract.
byteful Nov 7, 2021
cf708ad
Removed unnecessary code.
byteful Nov 7, 2021
fd3b42e
Cleaned up the code a bit more.
byteful Nov 7, 2021
e1fe2b9
Merge pull request #170 from byteful/unregister-listeners
retrooper Nov 9, 2021
9e58db6
Minor optimizations by removing redundant/abandoned files;
retrooper Nov 28, 2021
67e82e6
Merge remote-tracking branch 'origin/dev'
retrooper Nov 28, 2021
679d0ba
One more minor change
retrooper Nov 28, 2021
13965a4
Added support for 1.18-rc3
retrooper Nov 28, 2021
17f7c69
WrappedPacketInSettings updated to 1.18
retrooper Nov 28, 2021
905dd43
Minor bug fix
retrooper Nov 28, 2021
43ea773
Minor WrappedPacketInSettings change
retrooper Nov 28, 2021
0e3099e
We should now work on 1.18 servers
retrooper Nov 30, 2021
934c181
Support for reading 1.18 block positions
MWHunter Nov 30, 2021
01658ce
Add 1.18 support for WrappedPacketOutMapChunk
MWHunter Dec 1, 2021
b8823ce
Try fixing the map chunk packet for 1.18
MWHunter Dec 1, 2021
95e73c7
Another minor bug fix in settings packet.
retrooper Dec 1, 2021
df56ea0
Merge remote-tracking branch 'origin/dev' into dev
retrooper Dec 1, 2021
398bb4b
Update gradle-wrapper.properties
MWHunter Dec 1, 2021
169105a
Update gradle-wrapper.properties
MWHunter Dec 1, 2021
62685e9
Create gradle-publish.yml
AlessioGr Dec 2, 2021
316bc80
Update gradle-publish.yml
AlessioGr Dec 2, 2021
187084d
Update gradle-publish.yml
AlessioGr Dec 2, 2021
db8f291
Update gradle-publish.yml
AlessioGr Dec 2, 2021
5cbdcc4
JDK 8
AlessioGr Dec 2, 2021
0e42d7d
Fix blockpos reflection on 1.18
DefinePvP Dec 2, 2021
6d7a06b
Add support for SectionPosition in 1.18
DefinePvP Dec 2, 2021
33b92f5
Small correction to WrappedPacket#writeAnyObject
retrooper Dec 4, 2021
935c978
Fixed WrappedPacket#readGameMode and WrappedPacket#writeGameMode
retrooper Dec 6, 2021
d5c2619
Try fixing window items packet on 1.17.1 and 1.18
MWHunter Dec 6, 2021
590e94f
Add 1.17 support for the section position class
MWHunter Dec 6, 2021
1f02892
1.17 support for the window click packet
MWHunter Dec 7, 2021
7adb2c2
Remove incorrect window click reflection to support 1.17
MWHunter Dec 7, 2021
577d347
Merge pull request #171 from AlessioGr/master
retrooper Dec 8, 2021
4537ac2
Added 1.18.1 support
retrooper Dec 10, 2021
30981f8
Merge remote-tracking branch 'origin/dev' into dev
retrooper Dec 10, 2021
2489b76
Fix 1.17.1+ support on set slot
MWHunter Dec 11, 2021
176f2f7
Merge remote-tracking branch 'origin/dev' into dev
MWHunter Dec 11, 2021
eb96c52
Fixed NMSUtils#getEffectId and NMSUtils#getMobEffectListById (Used in…
retrooper Dec 12, 2021
90ec756
Merge remote-tracking branch 'origin/dev' into dev
retrooper Dec 12, 2021
d7a0d89
Fix WindowClick 1.9-1.16.5
LIWKK Dec 23, 2021
01cac8d
Merge pull request #177 from LIWKK/patch-30
MWHunter Dec 23, 2021
c200b8f
1.8-pre-19 launching
retrooper Dec 25, 2021
77918bb
Minor change to a debug
retrooper Dec 25, 2021
6b82b38
Fixed javadocs and added plugin.yml to repository
retrooper Jan 4, 2022
af477f8
Merge pull request #190 from retrooper/dev
retrooper Jan 6, 2022
60a5357
PacketEvents v1.8 now sends the API Version to bStats.
retrooper Jan 16, 2022
a83c3ba
I know this isn't a perfect solution, but we want to process outgoing…
retrooper Jan 18, 2022
691e8eb
Little comment added
retrooper Jan 21, 2022
80bc492
Fixed broken ProtocolLib compatibility.
retrooper Jan 31, 2022
e2ecb21
Updated to Geyser 2.0 API
retrooper Feb 2, 2022
f90925e
GeyserUtils fixed, now supports 2.0 Geyser API.
retrooper Feb 4, 2022
1943ba2
Removed debug.
retrooper Feb 4, 2022
13b3ac7
Bug fix in injecting players.
retrooper Feb 4, 2022
eb561b9
Updated to 1.18.2.
retrooper Feb 28, 2022
5865e05
WrappedPacketOutEntity and WrappedPacketOutEntityHeadRotation now acc…
retrooper Feb 28, 2022
d1fb535
WrappedPacketOutEntityEffect bug fix for 1.18.2
retrooper Mar 5, 2022
0a4fedf
Finally releasing packetevents 1.8.
retrooper Mar 7, 2022
3c4a732
Minor change to metrics.
retrooper Mar 7, 2022
c3bc190
Merge remote-tracking branch 'origin/master'
retrooper Mar 7, 2022
73420ef
Following semantic versioning. Release version: 1.8.0
retrooper Mar 7, 2022
bb9fe18
1.8.1 releasing.
retrooper Mar 7, 2022
0b458c2
Older versions of packetevents' update checker will break. We never f…
retrooper Mar 7, 2022
dc5d15b
We now support latest ProtocolLib snapshots. I'm sort of perplexed wh…
retrooper Mar 8, 2022
825b61a
Updated to 1.8.2 (Support latest ProtocolLib snapshots & supposed to …
retrooper Mar 8, 2022
f620e45
Update feature_request.md
retrooper Mar 10, 2022
3295b1f
Update feature_request.md
retrooper Mar 10, 2022
d6f1bf9
Updated bug report template.
retrooper Mar 22, 2022
6bd531e
Fixed 1.7 injector noclassdefined errors.
retrooper Mar 22, 2022
4711ede
Merge remote-tracking branch 'origin/master'
retrooper Mar 22, 2022
177e9b7
Releasing 1.8.3
retrooper Mar 24, 2022
3d7a0d9
WrappedPacketOutBlockChange hopefully now supports 1.18.1+
retrooper Mar 31, 2022
2767b99
We now don't discard packets sent by bytebuf packet plugins (for exam…
retrooper Apr 15, 2022
14a7835
Removed currently deleted pages
retrooper Apr 17, 2022
c2e0fe6
More changes to README
retrooper Apr 17, 2022
c43d992
Removed debugs.
retrooper Apr 27, 2022
1c0d932
Bump up version to 1.8.4;
retrooper Apr 27, 2022
5993529
Fix GPLv3 badge link
Jaren8r May 30, 2022
362bb8d
Merge pull request #413 from Jaren8r/patch-1
retrooper May 30, 2022
b2d7219
Working on 1.19 support but its not working?
retrooper Jun 16, 2022
dacf44d
Merge remote-tracking branch 'origin/master'
retrooper Jun 16, 2022
14f3d26
Minor progress
retrooper Jun 16, 2022
d5d4a9b
Fixed WrappedPacketOutSetSlot for 1.17.1+
retrooper Jun 18, 2022
8809088
Since our game profiles don't support texture property reading we're …
retrooper Jun 18, 2022
b843499
WrappedPacketInChat now has the 1.19 features
retrooper Jun 18, 2022
bb9132a
WrappedPacketOutChat now minimally supports 1.19 (atleast reading)
retrooper Jun 18, 2022
367f561
WrappedPacketOutSystemChat created along with its PacketType
retrooper Jun 18, 2022
bf60cb0
No debugs.
retrooper Jun 18, 2022
87aedb2
WrappedPacketOutEntity 1.19 support
retrooper Jun 20, 2022
f7aacf1
WrappedPacketOutEntityEffect 1.19 support,
retrooper Jun 20, 2022
5e42bef
Minor changes to Main class
retrooper Jun 20, 2022
26fde1e
Fix WrappedPacketOutEntityEffect for 1.19
retrooper Jun 22, 2022
1692451
Support multiple channel types now. (IO_URING fix for you guys) & Fix…
retrooper Jul 18, 2022
b910cd1
Merge remote-tracking branch 'origin/master'
retrooper Jul 18, 2022
62afe05
1.19.1 Update (PE 1.8) (#453)
NoJokeFNA Aug 2, 2022
4f2f355
Minor fix for WrappedPacketOutChat on 1.19+ when loading.
retrooper Aug 2, 2022
7fd4015
Added dependency
retrooper Aug 2, 2022
8fdd8e5
Preparing for 1.19.2 update.
retrooper Aug 4, 2022
01b201c
Fix for injection desync on late injectors.
retrooper Aug 4, 2022
3b947e7
1.19.2 support is ready
retrooper Aug 5, 2022
54a6801
fix chat exception (#476)
AoElite Sep 7, 2022
0b3f49c
Ignore fake connections.
retrooper Oct 3, 2022
022c081
Cache channels for logged in players.
retrooper Oct 3, 2022
7e76aaa
trying to fix spoofmc errors once again...
retrooper Dec 10, 2022
d52a967
Minimal 1.19.3 update
retrooper Dec 10, 2022
39ec3dc
WrappedPacketOutPlayerInfo was removed in 1.19.3
retrooper Dec 10, 2022
6777809
Update WrappedPacketOutEntityMetadata for 1.19.3
retrooper Dec 12, 2022
be7aca6
fixed ArrayIndexOutOfBoundsException
FlorianMichael Jan 1, 2023
70eaec0
Merge pull request #514 from FlorianMichael/master
retrooper Jan 2, 2023
33c0d9d
fix multiple exceptions with update checker and clean up code
MWHunter Feb 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Split Diff View
Split
Diff view
33 changes: 15 additions & 18 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Bug report
about: Report a bug to help us fix
title: "[BUG REPORT]"
about: Report bugs to help us improve our software.
title: ""
labels: bug
assignees: ''

Expand All @@ -10,11 +10,21 @@ assignees: ''
**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
**Software brand**
Please let us know what software you are using.
Eg. Spigot 1.18.2, Paper 1.18.2, Tuinity 1.18.2, Pufferfish 1.18.2, etc...
Make sure to mention the version of the software.

**Plugins**
Please give us a list of your plugins. Sometimes we run into incompatibilities. Having an overview of the plugins on your server can really help identify the problem quicker.
Eg. ViaVersion, ProtocolLib, HolographicDisplays
You may also provide a screenshot.

**How To Reproduce**
Steps to reproduce the behavior:
*Example:*
1. Login on the 1.16.4 minecraft client.
2. Join the server while it is still starting up.
1. Join with the 1.18.2 vanilla minecraft client.
2. Spam
3. ....
4. See error

Expand All @@ -24,18 +34,5 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.

**About your server (please complete the following information):**
- Spigot: [eg. Paper or Tuinity]
We only accept reports that are reproducible
on one of the supported spigots.

- Server Version: [eg. 1.16.4]
Feel free to report bugs for versions newer than 1.7.10, even if we
don’t support them yet, but be aware that we might have already
found the bug and fixed it in a dev build, just before you reported it.
Please don’t get frustrated in such cases.

- Plugins List if possible: [eg. ViaVersion, ProtocolLib, HolographicDisplays]

**Additional context**
Add any other context about the problem here.
33 changes: 33 additions & 0 deletions .github/workflows/gradle-publish.yml
F438
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Gradle Package

on: [ push, pull_request ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Gradle
run: gradle :clean :build

- name: Upload build artifacts
uses: actions/upload-artifact@v1
with:
name: packetevents-dev-build.jar
path: build/libs
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,8 @@ dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
.mvn/wrapper/maven-wrapper.jar
/src/main/resources/
/.gradle/
/.idea/
/build/
Binary file removed .gradle/7.0/executionHistory/executionHistory.bin
Binary file not shown.
Binary file removed .gradle/7.0/executionHistory/executionHistory.lock
Binary file not shown.
Binary file removed .gradle/7.0/fileHashes/fileHashes.bin
Binary file not shown.
Binary file removed .gradle/7.0/fileHashes/fileHashes.lock
Binary file not shown.
Binary file removed .gradle/7.0/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file removed .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file removed .gradle/checksums/checksums.lock
Binary file not shown.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
# packetevents

[![](https://img.shields.io/badge/License-GPLv3-yellow.svg)](https://github.com/retrooper/packetevents/blob/dev/LICENSE)
[![](https://img.shields.io/badge/License-GPLv3-yellow.svg)](https://github.com/retrooper/packetevents/blob/master/LICENSE)
[![](https://jitpack.io/v/retrooper/packetevents.svg)](https://jitpack.io/#retrooper/packetevents)

PacketEvents is an open-source Packet API. It has many cross-version packet-wrappers. You can process incoming and outgoing packets on the server. You can even send packets with our packet-wrappers. We are here to save you a ton of time.
PacketEvents is a powerful packet library. Our packet wrappers are efficient and easy to use. We support many protocol versions. (1.8+)

### Resources
* [SpigotMC](https://www.spigotmc.org/resources/packetevents-api.80279/)
* [JavaDoc](https://packetevents.github.io/javadocs)
* [Discord](https://discord.me/packetevents)

### Setup
[Learn more](https://github.com/retrooper/packetevents/wiki/1.-Setup)

### Discord
[Learn more](https://discord.me/packetevents)

### Contributing/Forking
[Learn more](https://github.com/retrooper/packetevents/wiki/2.-Contributing-and-Forking)\
Our discord server has a role for contributors and forkers.

### Sponsorships
[![](https://www.ej-technologies.com/images/product_banners/jprofiler_small.png)](https://www.ej-technologies.com/products/jprofiler/overview.html)

### Statistics
PacketEvents collects statistics anonymously through bStats. Participation is completely optional and you can opt-out at any time, although it is really helpful in figuring out what environments the plugin is running in (i.e. versions of Spigot, Java), so I can adjust development accordingly.
PacketEvents collects statistics anonymously using bStats. It helps give us an overview of what platforms use our project. If you really don't like, you can turn it off.

### Credit
PacketEvents uses an injector that is extremely similar to ViaVersion's injector. I have included license and copyright holder notice in the files taken from ViaVersion. Thank you ViaVersion.
21 changes: 6 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,36 +49,27 @@ repositories {
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
mavenCentral()
}

dependencies {
implementation 'org.jetbrains:annotations:20.1.0'
implementation 'org.jetbrains:annotations:23.0.0'

compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT'
compileOnly 'org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT'
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
compileOnly 'org.geysermc:connector:1.2.1-SNAPSHOT'
compileOnly 'com.viaversion:viaversion-api:4.0.1'
compileOnly 'com.github.ProtocolSupport:ProtocolSupport:3d24efeda6'

/*compileOnly 'org.github.spigot:1.16.2:1.16.2'
compileOnly 'org.github.spigot:1.8.8:1.8.8'
compileOnly 'org.github.spigot:1.7.10:1.7.10'*/
compileOnly 'org.github.spigot:1.16.2:1.16.2'
compileOnly 'org.github.spigot:1.13.2:1.13.2'
compileOnly 'org.github.spigot:1.13:1.13'
compileOnly 'org.github.spigot:1.12.2:1.12.2'
compileOnly 'org.github.spigot:1.9.4:1.9.4'
compileOnly 'org.github.spigot:1.9:1.9'
compileOnly 'org.github.spigot:1.8.8:1.8.8'
compileOnly 'org.github.spigot:1.7.10:1.7.10'

}

group = 'io.github.retrooper'
version = '1.8-pre-17'
version = '1.8.4'
description = 'packetevents'
java.sourceCompatibility = JavaVersion.VERSION_1_8

java.targetCompatibility = JavaVersion.VERSION_1_8
publishing {
publications {
maven(MavenPublication) {
Expand All @@ -89,4 +80,4 @@ publishing {

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
}
Loading
0