Skip to content
Merged
Changes from all commits
Commits
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
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package xyz.bluspring.modernnetworking.bukkit.api

import io.netty.buffer.ByteBuf
import io.netty.buffer.ByteBufUtil
import io.netty.buffer.Unpooled
import org.bukkit.entity.Player
import xyz.bluspring.modernnetworking.api.NetworkCodec
Expand All @@ -13,6 +14,6 @@ object BukkitNetworkSender {
val buffer = Unpooled.buffer()
(packet.definition.codec as NetworkCodec<T, ByteBuf>).encode(buffer, packet)

this.sendPluginMessage(registry.plugin, "${packet.definition.namespace}:${packet.definition.id}", buffer.array())
this.sendPluginMessage(registry.plugin, "${packet.definition.namespace}:${packet.definition.id}", ByteBufUtil.getBytes(buffer))
}
}