Skip to content

Commit

Permalink
fix: Not Serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
CoasterFreakDE committed Apr 30, 2024
1 parent eef7084 commit 032616a
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 32 deletions.
5 changes: 4 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group = "de.themeparkcraft.audioserver"
version = "1.0-SNAPSHOT"
version = "0.1-SNAPSHOT"

repositories {
maven("https://nexus.flawcra.cc/repository/maven-mirrors/")
Expand All @@ -27,4 +27,7 @@ subprojects {
maven("https://nexus.flawcra.cc/repository/maven-mirrors/")
}

group = project.group
version = project.version

}
3 changes: 0 additions & 3 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ plugins {
id("maven-publish")
}

group = "de.themeparkcraft.audioserver"
version = "0.1-SNAPSHOT"

val protobufVersion: String by project

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package de.themeparkcraft.audioserver.common.data.audiosources
package de.themeparkcraft.audioserver.common.interfaces

import de.themeparkcraft.audioserver.common.data.worldpositions.WorldPosition
import de.themeparkcraft.audioserver.common.interfaces.AudioSource
import kotlinx.serialization.Serializable

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package de.themeparkcraft.audioserver.common.interfaces

import kotlinx.serialization.Serializable

/**
* The AudioSource interface represents an audio source. It provides access to the unique identifier (uid)
* and volume of the audio source.
*/
interface AudioSource : RabbitSendable {
@Serializable
sealed interface AudioSource : RabbitSendable {
val uid: String
val volume: Float
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package de.themeparkcraft.audioserver.common.data.audiosources
package de.themeparkcraft.audioserver.common.interfaces

import de.themeparkcraft.audioserver.common.interfaces.AudioSource
import java.util.*
import kotlinx.serialization.Serializable

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package de.themeparkcraft.audioserver.common.data
package de.themeparkcraft.audioserver.common.interfaces

import de.themeparkcraft.audioserver.common.data.worldpositions.WorldPosition
import de.themeparkcraft.audioserver.common.interfaces.RabbitSendable
import kotlinx.serialization.Serializable

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.themeparkcraft.audioserver.common.data.audiosources
package de.themeparkcraft.audioserver.common.interfaces

import de.themeparkcraft.audioserver.common.interfaces.AudioSource
import kotlinx.serialization.Serializable

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.themeparkcraft.audioserver.common.data.worldpositions
package de.themeparkcraft.audioserver.common.interfaces

/**
* Represents a pointed position in the world, specified by its x, y, z coordinates, the world it belongs to,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package de.themeparkcraft.audioserver.common.data.audiosources
package de.themeparkcraft.audioserver.common.interfaces

import de.themeparkcraft.audioserver.common.data.worldpositions.WorldPosition
import de.themeparkcraft.audioserver.common.interfaces.AudioSource
import kotlinx.serialization.Serializable

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package de.themeparkcraft.audioserver.common.interfaces

import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.Serializable
import kotlinx.serialization.decodeFromByteArray
import kotlinx.serialization.encodeToByteArray
import kotlinx.serialization.protobuf.ProtoBuf

interface RabbitSendable {
@Serializable
sealed interface RabbitSendable {

@OptIn(ExperimentalSerializationApi::class)
fun encode(): ByteArray {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.themeparkcraft.audioserver.common.data.worldpositions
package de.themeparkcraft.audioserver.common.interfaces

import de.themeparkcraft.audioserver.common.interfaces.RabbitSendable
import kotlinx.serialization.Serializable

/**
Expand Down
3 changes: 0 additions & 3 deletions minecraft/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ plugins {
id("maven-publish")
}

group = "de.themeparkcraft.audioserver"
version = "0.1-SNAPSHOT"

val minecraftVersion: String by project

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package de.themeparkcraft.audioserver.minecraft

import de.themeparkcraft.audioserver.common.data.PlayerPositionUpdate
import de.themeparkcraft.audioserver.common.interfaces.PlayerPositionUpdate
import de.themeparkcraft.audioserver.common.data.RabbitConfiguration
import de.themeparkcraft.audioserver.common.errors.AudioServerNotInitializedError
import de.themeparkcraft.audioserver.common.interfaces.AudioSource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package de.themeparkcraft.audioserver.minecraft.extensions

import de.themeparkcraft.audioserver.common.data.worldpositions.PointedWorldPosition
import de.themeparkcraft.audioserver.common.interfaces.PointedWorldPosition
import org.bukkit.entity.Player

/**
Expand Down
4 changes: 0 additions & 4 deletions standalone/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ plugins {
id("com.github.johnrengelman.shadow") version "8.1.1"
}

group = "de.themeparkcraft.audioserver"
version = "1.0-SNAPSHOT"


dependencies {
implementation(project(":common"))
shadow(project(":common"))
Expand Down

0 comments on commit 032616a

Please sign in to comment.