Skip to content

add new event#686

Closed
Oharass wants to merge 1 commit into
PurpurMC:ver/1.17.1from
Oharass:player-packet-event
Closed

add new event#686
Oharass wants to merge 1 commit into
PurpurMC:ver/1.17.1from
Oharass:player-packet-event

Conversation

@Oharass

@Oharass Oharass commented Sep 26, 2021

Copy link
Copy Markdown
Contributor

add event for player packets. Packet can not be api ever because too super unstable. Because of this, packet is object. Nothing more nothing less. Not real packet. Just object. This is useful for plugin like protocollib can not do easy. This is most expansive move for purpur api yet. This adds.

if you do not like tell me. I accept defeat.

This is much more useful because of MOJMAP and PAPERWEIGHT. Much more stable for different versions.

I would like to add a send packet method in the future with this. This new method can replace protocollib without true packet api.

@BomBardyGamer

BomBardyGamer commented Nov 26, 2021

Copy link
Copy Markdown
Contributor

Hope no one complains about me sharing my view on this, but I just want to say something here.

The reason why nobody has done this before is because, as you said yourself, a packet API is too unstable. Also, it is way too low-level to implement in the way that most would be seeking.
Also, I believe that having packets here being Objects doesn't really help either, since it:

  1. Promotes the usage of NMS, which should be avoided under all circumstances
  2. Makes it clear that this should not be public API

In summary, it's a good addition, just not one to be exposed to public API.

(P.S. I realise I'm really late here, but I thought I should voice my thoughts anyway, because why not)

@katekerllenevich

Copy link
Copy Markdown
Member

I'm going to deny this PR for a few reasons.

  1. There are other ways to register a listener for packets (https://www.spigotmc.org/threads/packet-listener-using-netty-tutorial.69772/)
  2. Bukkit events are laggy AF, and packets are sent all the time
  3. Packets never ever touch API

encode42 added a commit that referenced this pull request Dec 10, 2021
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@b4192fd fix NPE from changes in e4358b82171
PaperMC/Paper@5b6445a Revert "fix NPE from changes in e4358b82171"
PaperMC/Paper@323c087 Revert "#686: Fix contains for default section generating real sections"
PaperMC/Paper@c837002 Fix client world difficulty sync issue (#7035)
PaperMC/Paper@a4782f7 [ci skip] fixup indent
PaperMC/Paper@83aee0f [ci skip] Clarify setSize consequences for Slimes (#7036)
PaperMC/Paper@7c8fdc1 Add dropped hunk from mid-tick tasks (#7034)
PaperMC/Paper@fd263ef Fix empty/null chunk section check in LevelChunk#getBlockData, rename… (#7039)
PaperMC/Paper@b8d486c Create workflow to add new PRs to the PR Queue project (#6918)
PaperMC/Paper@a50e273 Include axolotls in affected entities for water splash potions (#7024)
PaperMC/Paper@af95df8 Port Actually unload POI data from Tuinity 1.16 (#7044)
PaperMC/Paper@04897b1 [ci skip] Revert "Create workflow to add new PRs to the PR Queue project (#6918)" (#7046)
PaperMC/Paper@b4a77a8 Updated Upstream (Bukkit/CraftBukkit) (#7045)
PaperMC/Paper@0e25db2 Fix mis-placed processEnchantOrder from 1.18 update (#7052)
PaperMC/Paper@53d026e Fix unused EntitySectionStorage#getEntities(AABB, Consumer) method being broken
PaperMC/Paper@772e880 Fix light propagation in high y sections
PaperMC/Paper@33ea869 Bump Starlight light version
PaperMC/Paper@74fd151 Fix entity equipment on cancellation of EntityDeathEvent (#5740)
PaperMC/Paper@758e2a7 Fix bad ticking checks for blocks
PaperMC/Paper@0e91b6a Return 0 for light values if a dimenion does not have them
PaperMC/Paper@188a8df Fix ChunkSnapshot#isSectionEmpty(int)
PaperMC/Paper@bbc7451 Fix issue with snapshotted biomes in last commit
PaperMC/Paper@b475c6a Backport log4j fix
PaperMC/Paper@4e355c4 Updated Upstream (CraftBukkit)
PaperMC/Paper@dce79f3 Update Log4J (#7069)
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.

3 participants