Skip to content

Commit 8afce54

Browse files
committed
feat: add BukkitLocation
1 parent 7705085 commit 8afce54

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
}
99

1010
group = 'io.typst'
11-
version = '1.1.0'
11+
version = '1.2.0'
1212

1313
repositories {
1414
mavenCentral()

settings.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
21
rootProject.name = 'bukkit-kotlin-serialization'
3-

src/main/kotlin/io/typst/bukkit/kotlin/serialization/LocationSerializer.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ import kotlinx.serialization.encoding.Decoder
77
import kotlinx.serialization.encoding.Encoder
88
import org.bukkit.Location
99

10+
@Deprecated("Use BukkitLocation instead, this might causes issue with world manager plugins.")
1011
typealias LocationSerializable = @Serializable(LocationSerializer::class) Location
1112

13+
@Deprecated("Use BukkitLocation instead, this might causes issue with world manager plugins.")
1214
class LocationSerializer : KSerializer<Location> {
1315
override val descriptor: SerialDescriptor
1416
get() = ConfigSerializableSerializer.descriptor
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package io.typst.bukkit.kotlin.serialization.location
2+
3+
import kotlinx.serialization.Serializable
4+
5+
@Serializable
6+
data class BukkitLocation(
7+
val world: String,
8+
val x: Double,
9+
val y: Double,
10+
val z: Double,
11+
val yaw: Double,
12+
val pitch: Double,
13+
)

0 commit comments

Comments
 (0)