Comments (8)
This issue should probably get the question
label.
from protocolize.
Hey thank you for using Protocolize!
To your question number one:
You can simply add support for custom packets at your own. There are simple things you need:
- A map containing every protocol id and the packet's according packet id from that version. Example click here.
- A class extending the
de.exceptionflug.protocolize.api.protocol.AbstractPacket
class. For example click here. - Documentation about the packet layout for all supported protocol versions. For sign change this would be the link for the 1.14.4 protocol: https://wiki.vg/Protocol#Update_Sign
You can find documentation for older protocol versions right here: https://wiki.vg/Protocol_version_numbers - In the class you have to override the
read(ByteBuf buf, Direction direction, int protocolVersion)
andwrite(ByteBuf buf, Direction direction, int protocolVersion)
methods. Take a look at other protocolize pre-implemented packets like BlockPlacement. - Register the packet using
ProtocolAPI.getPacketRegistration().registerPacket(Protocol protocol, Direction direction, Class<? extends AbstractPacket> clazz, Map<Integer, Integer> protocolIdMapping);
. For example click here.
That's all. Now you can use your own implemented packet like the others.
To your second question:
This is not possible since this requires experimental features to be enabled which I don't recommend. Protocolize is not able to track the spigot inventory contents when those experimental features are disabled. The only recommended way is the way stated above. Otherwise you could have accessed the PlayerInventory using InventoryManager.getInventory(UUID uuid);
and get the item from the held item slot.
Another thing I have to mention: Please don't use AbstractPacket.setCancelSend(boolean cancelSend);
anymore. Please cancel the event itself instead :)
For further questions I am ready to help :)
from protocolize.
Implementing SignUpdate at next update v1.5.0
from protocolize.
In fbdd5a2 you will find an implementation of SignUpdate coming to the next major protocolize release supporting 1.15 next week.
from protocolize.
Thank you! I honestly didn't expect this feature to be added so quickly.
You certainly know much more than I do about packets. I doubt I could implement a sign-change packet myself. However, I'm glad you are able and willing :)
from protocolize.
No problem. You can use an early version of v1.5.0 by cloning and building the 1.15 branch. Artifact is deployed to maven repo.
from protocolize.
Don't worry, I was competent enough to figure that out myself using maven dependency resolution.
from protocolize.
SignUpdate packet now added to master branch courtesy of Exceptionflug. https://github.com/Exceptionflug/protocolize/blob/master/protocolize-world/src/main/java/de/exceptionflug/protocolize/world/packet/SignUpdate.java
from protocolize.
Related Issues (20)
- Incompatible with `MCKotlin` HOT 3
- Error on the 1.20.2 HOT 2
- Discord Invite HOT 1
- Retrieving client brand no longer works like before HOT 10
- Inventory Item bug
- Velocity build 276/290 error console HOT 4
- PlayerInventory items disappear when clicking HOT 3
- Can't send PlayerPosition packet HOT 4
- pipeling errors HOT 5
- Error when opening inventory to 1.20.4 client HOT 21
- update to 1.20.3/1.20.4 please :) HOT 4
- The discord link in the README is dead HOT 1
- When installing this protocolize plug-in, failure to enter the server using ViaVersion HOT 4
- [Question] Missing Enderchast sounds? HOT 2
- Errors with the latest devbuild (#928) HOT 2
- Issues with inventories HOT 2
- Error when a player joined the server with the latest version of Velocity (320) HOT 12
- inventory error HOT 1
- Server crash with pipeline not initialized HOT 4
- Client times out on latest version of Velocity. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protocolize.