Compatibility
Minecraft: Java Edition
1.21.x
1.20.4–1.20.6
1.20–1.20.1
Platforms
Paper
Supported environments
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Links
Creators
Details
Licensed MIT
Published last month
Updated last month
PayloadLib
Easier approach for Paper servers to send & handle custom payloads, simple & powerful.
Please refer to our GitHub Repository for more information.
Importing
To access the snapshot version of PayloadLib, please add this in your build.gradle
:
repositories {
maven {
name = 'Central Portal Snapshots'
url = 'https://central.sonatype.com/repository/maven-snapshots/'
}
}
dependencies {
implementation 'top.nlrdev:payloadlib:0.0.2-SNAPSHOT'
// Optional dependency, providing ByteBuf
implementation 'io.netty:netty-buffer:4.2.2.Final'
}
Embedding this plugin within other plugin JARs is not recommended, as it can lead to various issues.
Supported Data Types
Primitive
Primitive | Packaged | Array | Unsigned Implementation |
---|---|---|---|
boolean | Boolean | Unsupported | None |
byte | Byte | byte[] | None |
short | Short | Unsupported | top.nlrdev.payloadlib.types.UnsignedShort |
char | Character | Unsupported | None |
int | Integer | Unsupported | None |
long | Long | Unsupported | None |
float | Float | Unsupported | None |
double | Double | Unsupported | None |
Non-Primitive
Type | PayloadLib |
---|---|
String | Unchanged |
UUID | Unchanged |
org.joml.Vector3f |
Unchanged |
org.joml.Quaternionf |
Unchanged |
Minecraft (Official) | Minecraft (Yarn) | PayloadLib |
---|---|---|
net.minecraft.resources.ResourceLocation |
net.minecraft.util.Identifier |
top.nlrdev.payloadlib.types.Identifier |
ByteBufCodecs#VAR_INT |
PacketCodecs#VAR_INT |
top.nlrdev.payloadlib.types.VarInt |
ByteBufCodecs#VAR_LONG |
PacketCodecs#VAR_LONG |
top.nlrdev.payloadlib.types.VarLong |
net.minecraft.world.phys.Vec3 |
net.minecraft.util.math.Vec3d |
org.joml.Vector3d |
net.minecraft.core.BlockPos |
net.minecraft.util.math.BlockPos |
top.nlrdev.payloadlib.types.BlockPos |
Examples
You can refer to these live examples to get inspiration:
License
This mod is licensed under MIT License.