Skip to content

Commit

Permalink
[6.2.0] 为 Packet#write 函数增加 remap 参数
Browse files Browse the repository at this point in the history
  • Loading branch information
Bkm016 committed Oct 17, 2024
1 parent f99bcfa commit 0ed9943
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=taboolib
version=6.2.0-beta19
version=6.2.0-beta20
kotlin.incremental=true
kotlin.incremental.java=true
kotlin.caching.enabled=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ abstract class Packet {
abstract fun <T> read(name: String, remap: Boolean = true): T?

/** 写入字段 */
abstract fun write(name: String, value: Any?)
abstract fun write(name: String, value: Any?, remap: Boolean = true)

/** 覆盖原始数据包 */
abstract fun overwrite(newPacket: Any)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class PacketImpl(override var source: Any) : Packet() {
}

/** 写入字段 */
override fun write(name: String, value: Any?) {
source.setProperty(name, value)
override fun write(name: String, value: Any?, remap: Boolean) {
source.setProperty(name, value, remap = remap)
}

/** 覆盖原始数据包 */
Expand Down

0 comments on commit 0ed9943

Please sign in to comment.