diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..a851c94
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,11 @@
+version: 2
+updates:
+ - package-ecosystem: "maven"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
\ No newline at end of file
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ea12ccd..8353b5f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -11,13 +11,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Set up JDK 21
- uses: actions/setup-java@v4
+ uses: actions/setup-java@v5
with:
java-version: '21'
- distribution: 'temurin'
+ distribution: 'corretto'
cache: maven
- name: Build and verify
diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml
new file mode 100644
index 0000000..90b521f
--- /dev/null
+++ b/.github/workflows/code-coverage.yml
@@ -0,0 +1,30 @@
+name: Code Coverage
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+
+jobs:
+ coverage:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v6
+
+ - name: Set up JDK 21
+ uses: actions/setup-java@v5
+ with:
+ java-version: '21'
+ distribution: 'corretto'
+ cache: maven
+
+ - name: Run tests with coverage
+ run: mvn test jacoco:report -B
+
+ - name: Upload coverage report
+ uses: actions/upload-artifact@v6
+ with:
+ name: coverage-report
+ path: target/site/jacoco/
\ No newline at end of file
diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml
new file mode 100644
index 0000000..1bcab4d
--- /dev/null
+++ b/.github/workflows/code-quality.yml
@@ -0,0 +1,24 @@
+name: Code Quality
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+
+jobs:
+ formatting:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v6
+
+ - name: Set up JDK 21
+ uses: actions/setup-java@v5
+ with:
+ java-version: '21'
+ distribution: 'corretto'
+ cache: maven
+
+ - name: Check formatting
+ run: mvn spotless:check -B
\ No newline at end of file
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 0000000..ef75120
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,5 @@
+# Atlas Project Instructions
+
+## Code Style
+- Always use explicit imports — never use wildcard imports (e.g., `import com.example.Foo`, not `import com.example.*`)
+- No line should exceed 140 characters in length
diff --git a/pom.xml b/pom.xml
index f01d259..4572842 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,6 +14,7 @@
official
2.1.10
21
+ 0.8.14
@@ -99,6 +100,68 @@
+
+ com.diffplug.spotless
+ spotless-maven-plugin
+ 3.2.1
+
+
+
+ 1.0.1
+
+
+
+
+ 1.19.1
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+ net/sf/jsqlparser/**
+
+
+
+
+ prepare-agent
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+ jacoco-check
+
+ check
+
+
+
+
+ PACKAGE
+
+
+ LINE
+ COVEREDRATIO
+ 0.0
+
+
+
+
+
+
+
+
diff --git a/src/main/kotlin/com/coderjoe/atlas/Atlas.kt b/src/main/kotlin/com/coderjoe/atlas/Atlas.kt
index 89e54a5..fb38c0a 100644
--- a/src/main/kotlin/com/coderjoe/atlas/Atlas.kt
+++ b/src/main/kotlin/com/coderjoe/atlas/Atlas.kt
@@ -2,12 +2,12 @@ package com.coderjoe.atlas
import com.coderjoe.atlas.core.AtlasBlockListener
import com.coderjoe.atlas.core.BlockSystem
-import com.coderjoe.atlas.guide.GuideBook
-import com.coderjoe.atlas.guide.GuideBookListener
import com.coderjoe.atlas.fluid.FluidBlockDialog
import com.coderjoe.atlas.fluid.FluidBlockFactory
import com.coderjoe.atlas.fluid.FluidBlockPersistence
import com.coderjoe.atlas.fluid.FluidBlockRegistry
+import com.coderjoe.atlas.guide.GuideBook
+import com.coderjoe.atlas.guide.GuideBookListener
import com.coderjoe.atlas.power.PowerBlockDialog
import com.coderjoe.atlas.power.PowerBlockFactory
import com.coderjoe.atlas.power.PowerBlockPersistence
@@ -57,39 +57,46 @@ class Atlas : JavaPlugin() {
initTransportSystem()
// Register unified listener
- val powerSystem = BlockSystem(
- name = "power",
- registry = powerBlockRegistry,
- factory = PowerBlockFactory,
- descriptors = powerDescriptors(),
- showDialog = { player, block ->
- PowerBlockDialog.showPowerDialog(player, block as com.coderjoe.atlas.power.PowerBlock, powerBlockRegistry)
- }
- )
-
- val fluidSystem = BlockSystem(
- name = "fluid",
- registry = fluidBlockRegistry,
- factory = FluidBlockFactory,
- descriptors = fluidDescriptors(),
- showDialog = { player, block ->
- FluidBlockDialog.showFluidDialog(player, block as com.coderjoe.atlas.fluid.FluidBlock, fluidBlockRegistry)
- }
- )
-
- val transportSystem = BlockSystem(
- name = "transport",
- registry = transportBlockRegistry,
- factory = TransportBlockFactory,
- descriptors = transportDescriptors(),
- showDialog = { player, block ->
- TransportBlockDialog.showTransportDialog(player, block as com.coderjoe.atlas.transport.TransportBlock, transportBlockRegistry)
- }
- )
+ val powerSystem =
+ BlockSystem(
+ name = "power",
+ registry = powerBlockRegistry,
+ factory = PowerBlockFactory,
+ descriptors = powerDescriptors(),
+ showDialog = { player, block ->
+ PowerBlockDialog.showPowerDialog(player, block as com.coderjoe.atlas.power.PowerBlock, powerBlockRegistry)
+ },
+ )
+
+ val fluidSystem =
+ BlockSystem(
+ name = "fluid",
+ registry = fluidBlockRegistry,
+ factory = FluidBlockFactory,
+ descriptors = fluidDescriptors(),
+ showDialog = { player, block ->
+ FluidBlockDialog.showFluidDialog(player, block as com.coderjoe.atlas.fluid.FluidBlock, fluidBlockRegistry)
+ },
+ )
+
+ val transportSystem =
+ BlockSystem(
+ name = "transport",
+ registry = transportBlockRegistry,
+ factory = TransportBlockFactory,
+ descriptors = transportDescriptors(),
+ showDialog = { player, block ->
+ TransportBlockDialog.showTransportDialog(
+ player,
+ block as com.coderjoe.atlas.transport.TransportBlock,
+ transportBlockRegistry,
+ )
+ },
+ )
server.pluginManager.registerEvents(
AtlasBlockListener(this, listOf(powerSystem, fluidSystem, transportSystem)),
- this
+ this,
)
val guideBookListener = GuideBookListener(this)
@@ -97,11 +104,16 @@ class Atlas : JavaPlugin() {
server.addRecipe(GuideBook.createRecipe(this))
// Auto-save every 5 minutes (6000 ticks)
- autoSaveTask = server.scheduler.runTaskTimer(this, Runnable {
- powerBlockPersistence.save(powerBlockRegistry)
- fluidBlockPersistence.save(fluidBlockRegistry)
- transportBlockPersistence.save(transportBlockRegistry)
- }, 6000L, 6000L)
+ autoSaveTask =
+ server.scheduler.runTaskTimer(
+ this,
+ Runnable {
+ powerBlockPersistence.save(powerBlockRegistry)
+ fluidBlockPersistence.save(fluidBlockRegistry)
+ transportBlockPersistence.save(transportBlockRegistry)
+ },
+ 6000L, 6000L,
+ )
logger.atlasInfo("Atlas plugin enabled!")
}
@@ -169,7 +181,7 @@ class Atlas : JavaPlugin() {
private fun transportDescriptors(): Map {
return listOf(
- com.coderjoe.atlas.transport.block.ConveyorBelt.descriptor
+ com.coderjoe.atlas.transport.block.ConveyorBelt.descriptor,
).associateBy { it.baseBlockId }
}
@@ -184,7 +196,7 @@ class Atlas : JavaPlugin() {
com.coderjoe.atlas.power.block.MultiPowerCable.descriptor,
com.coderjoe.atlas.power.block.CobblestoneFactory.descriptor,
com.coderjoe.atlas.power.block.ObsidianFactory.descriptor,
- com.coderjoe.atlas.power.block.PowerMerger.descriptor
+ com.coderjoe.atlas.power.block.PowerMerger.descriptor,
).associateBy { it.baseBlockId }
}
@@ -193,7 +205,7 @@ class Atlas : JavaPlugin() {
com.coderjoe.atlas.fluid.block.FluidPump.descriptor,
com.coderjoe.atlas.fluid.block.FluidPipe.descriptor,
com.coderjoe.atlas.fluid.block.FluidContainer.descriptor,
- com.coderjoe.atlas.fluid.block.FluidMerger.descriptor
+ com.coderjoe.atlas.fluid.block.FluidMerger.descriptor,
).associateBy { it.baseBlockId }
}
}
diff --git a/src/main/kotlin/com/coderjoe/atlas/NexoIntegration.kt b/src/main/kotlin/com/coderjoe/atlas/NexoIntegration.kt
index 524cc1d..248a159 100644
--- a/src/main/kotlin/com/coderjoe/atlas/NexoIntegration.kt
+++ b/src/main/kotlin/com/coderjoe/atlas/NexoIntegration.kt
@@ -57,7 +57,10 @@ class NexoIntegration(private val plugin: JavaPlugin) {
}
}
- private fun discoverResources(prefix: String, suffix: String): List {
+ private fun discoverResources(
+ prefix: String,
+ suffix: String,
+ ): List {
val url = javaClass.classLoader.getResource(prefix) ?: return emptyList()
return when (url.protocol) {
diff --git a/src/main/kotlin/com/coderjoe/atlas/PlayerJoinListener.kt b/src/main/kotlin/com/coderjoe/atlas/PlayerJoinListener.kt
index bd1d17c..8e20b40 100644
--- a/src/main/kotlin/com/coderjoe/atlas/PlayerJoinListener.kt
+++ b/src/main/kotlin/com/coderjoe/atlas/PlayerJoinListener.kt
@@ -5,9 +5,8 @@ import org.bukkit.event.Listener
import org.bukkit.event.player.PlayerJoinEvent
class PlayerJoinListener(
- private val resourcePackManager: ResourcePackManager
+ private val resourcePackManager: ResourcePackManager,
) : Listener {
-
@EventHandler
fun onPlayerJoin(event: PlayerJoinEvent) {
val player = event.player
diff --git a/src/main/kotlin/com/coderjoe/atlas/ResourcePackManager.kt b/src/main/kotlin/com/coderjoe/atlas/ResourcePackManager.kt
index 4a5a607..b4edf7a 100644
--- a/src/main/kotlin/com/coderjoe/atlas/ResourcePackManager.kt
+++ b/src/main/kotlin/com/coderjoe/atlas/ResourcePackManager.kt
@@ -3,14 +3,12 @@ package com.coderjoe.atlas
import net.kyori.adventure.resource.ResourcePackInfo
import net.kyori.adventure.resource.ResourcePackRequest
import net.kyori.adventure.text.Component
-import net.kyori.adventure.text.format.NamedTextColor
import org.bukkit.entity.Player
import org.bukkit.plugin.java.JavaPlugin
import java.net.URI
import java.util.UUID
class ResourcePackManager(private val plugin: JavaPlugin) {
-
private var packInfo: ResourcePackInfo? = null
private var isRequired: Boolean = false
private var promptMessage: Component? = null
@@ -39,11 +37,12 @@ class ResourcePackManager(private val plugin: JavaPlugin) {
val packId = UUID.nameUUIDFromBytes(url.toByteArray())
try {
- packInfo = ResourcePackInfo.resourcePackInfo()
- .uri(URI.create(url))
- .hash(hash)
- .id(packId)
- .build()
+ packInfo =
+ ResourcePackInfo.resourcePackInfo()
+ .uri(URI.create(url))
+ .hash(hash)
+ .id(packId)
+ .build()
if (prompt.isNotBlank()) {
promptMessage = Component.text(prompt)
@@ -58,14 +57,15 @@ class ResourcePackManager(private val plugin: JavaPlugin) {
fun sendToPlayer(player: Player) {
val info = packInfo ?: return
- val request = ResourcePackRequest.resourcePackRequest()
- .packs(info)
- .required(isRequired)
- .replace(true)
- .apply {
- promptMessage?.let { prompt(it) }
- }
- .build()
+ val request =
+ ResourcePackRequest.resourcePackRequest()
+ .packs(info)
+ .required(isRequired)
+ .replace(true)
+ .apply {
+ promptMessage?.let { prompt(it) }
+ }
+ .build()
player.sendResourcePacks(request)
diff --git a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlock.kt b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlock.kt
index b5ff5af..0370ee9 100644
--- a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlock.kt
+++ b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlock.kt
@@ -10,7 +10,7 @@ import org.bukkit.plugin.java.JavaPlugin
import org.bukkit.scheduler.BukkitTask
abstract class AtlasBlock(
- val location: Location
+ val location: Location,
) {
private var updateTask: BukkitTask? = null
protected val plugin: JavaPlugin get() = testPlugin ?: JavaPlugin.getPlugin(Atlas::class.java)
@@ -23,7 +23,9 @@ abstract class AtlasBlock(
}
protected abstract fun blockUpdate()
+
abstract fun getVisualStateBlockId(): String
+
abstract fun getRegistry(): BlockRegistry<*>
open val facing: BlockFace get() = BlockFace.SELF
@@ -48,18 +50,30 @@ abstract class AtlasBlock(
fun start() {
currentVisualState = NexoBlocks.customBlockMechanic(location.block)?.itemID
- plugin.server.scheduler.runTask(plugin, Runnable {
- updateVisualState()
- })
-
- updateTask = plugin.server.scheduler.runTaskTimer(plugin, Runnable {
- try {
- blockUpdate()
+ plugin.server.scheduler.runTask(
+ plugin,
+ Runnable {
updateVisualState()
- } catch (e: Exception) {
- plugin.logger.warning("Error in block tick at ${location.blockX},${location.blockY},${location.blockZ}: ${e.message}")
- }
- }, updateIntervalTicks, updateIntervalTicks)
+ },
+ )
+
+ updateTask =
+ plugin.server.scheduler.runTaskTimer(
+ plugin,
+ Runnable {
+ try {
+ blockUpdate()
+ updateVisualState()
+ } catch (e: Exception) {
+ plugin.logger.warning(
+ """
+ Error in block tick at ${'$'}{location.blockX},${'$'}{location.blockY},${'$'}{location.blockZ}: ${'$'}{e.message}
+ """.trimIndent(),
+ )
+ }
+ },
+ updateIntervalTicks, updateIntervalTicks,
+ )
plugin.logger.atlasInfo("${this::class.simpleName} at ${location.blockX},${location.blockY},${location.blockZ} started")
}
diff --git a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockDialog.kt b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockDialog.kt
index c4d3ece..43e1942 100644
--- a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockDialog.kt
+++ b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockDialog.kt
@@ -23,7 +23,7 @@ object AtlasBlockDialog {
player: Player,
block: AtlasBlock,
registry: BlockRegistry<*>,
- renderDialog: (Player, AtlasBlock, onClose: (Player) -> Unit) -> Unit
+ renderDialog: (Player, AtlasBlock, onClose: (Player) -> Unit) -> Unit,
) {
activeDialogs.remove(player.uniqueId)?.cancel()
@@ -31,21 +31,27 @@ object AtlasBlockDialog {
renderDialog(player, block, onClose)
- val task = plugin.server.scheduler.runTaskTimer(plugin, Runnable {
- if (!player.isOnline) {
- activeDialogs.remove(player.uniqueId)?.cancel()
- return@Runnable
- }
- if (player.location.distance(block.location) > 10) {
- activeDialogs.remove(player.uniqueId)?.cancel()
- return@Runnable
- }
- if (registry.getBlock(block.location) == null) {
- activeDialogs.remove(player.uniqueId)?.cancel()
- return@Runnable
- }
- renderDialog(player, block, onClose)
- }, 10L, 10L)
+ val task =
+ plugin.server.scheduler.runTaskTimer(
+ plugin,
+ Runnable {
+ if (!player.isOnline) {
+ activeDialogs.remove(player.uniqueId)?.cancel()
+ return@Runnable
+ }
+ if (player.location.distance(block.location) > 10) {
+ activeDialogs.remove(player.uniqueId)?.cancel()
+ return@Runnable
+ }
+ if (registry.getBlock(block.location) == null) {
+ activeDialogs.remove(player.uniqueId)?.cancel()
+ return@Runnable
+ }
+ renderDialog(player, block, onClose)
+ },
+ 10L,
+ 10L,
+ )
activeDialogs[player.uniqueId] = task
}
diff --git a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockListener.kt b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockListener.kt
index 356e488..dd1791a 100644
--- a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockListener.kt
+++ b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockListener.kt
@@ -14,9 +14,8 @@ import org.bukkit.plugin.java.JavaPlugin
class AtlasBlockListener(
private val plugin: JavaPlugin,
- private val systems: List>
+ private val systems: List>,
) : Listener {
-
@EventHandler
fun onBlockPlace(event: BlockPlaceEvent) {
val location = event.block.location
@@ -47,37 +46,44 @@ class AtlasBlockListener(
event: BlockPlaceEvent,
system: BlockSystem<*>,
descriptor: BlockDescriptor,
- blockId: String
+ blockId: String,
) {
when (descriptor.placementType) {
PlacementType.SIMPLE -> {
val location = event.block.location.clone()
- val facing = if (descriptor.directionalVariants.isEmpty()) {
- getPlayerFacing(event)
- } else {
- BlockFace.SELF
- }
+ val facing =
+ if (descriptor.directionalVariants.isEmpty()) {
+ getPlayerFacing(event)
+ } else {
+ BlockFace.SELF
+ }
createAndRegister(system, blockId, location, facing)
}
PlacementType.DIRECTIONAL -> {
val facing = getDirectionalFacing(event, descriptor)
val variantId = descriptor.directionalVariants[facing] ?: return
val location = event.block.location.clone()
- plugin.server.scheduler.runTask(plugin, Runnable {
- location.block.setType(Material.AIR, false)
- NexoBlocks.place(variantId, location)
- createAndRegister(system, variantId, location, facing)
- })
+ plugin.server.scheduler.runTask(
+ plugin,
+ Runnable {
+ location.block.setType(Material.AIR, false)
+ NexoBlocks.place(variantId, location)
+ createAndRegister(system, variantId, location, facing)
+ },
+ )
}
PlacementType.DIRECTIONAL_OPPOSITE -> {
val facing = getDirectionalFacing(event, descriptor, opposite = true)
val variantId = descriptor.directionalVariants[facing] ?: blockId
val location = event.block.location.clone()
- plugin.server.scheduler.runTask(plugin, Runnable {
- location.block.setType(Material.AIR, false)
- NexoBlocks.place(variantId, location)
- createAndRegister(system, variantId, location, facing)
- })
+ plugin.server.scheduler.runTask(
+ plugin,
+ Runnable {
+ location.block.setType(Material.AIR, false)
+ NexoBlocks.place(variantId, location)
+ createAndRegister(system, variantId, location, facing)
+ },
+ )
}
}
}
@@ -87,7 +93,7 @@ class AtlasBlockListener(
system: BlockSystem<*>,
blockId: String,
location: org.bukkit.Location,
- facing: BlockFace
+ facing: BlockFace,
) {
val factory = system.factory as BlockFactory
val registry = system.registry as BlockRegistry
@@ -138,7 +144,10 @@ class AtlasBlockListener(
}
}
- private fun resolveFacingFromVariant(descriptor: BlockDescriptor, blockId: String): BlockFace {
+ private fun resolveFacingFromVariant(
+ descriptor: BlockDescriptor,
+ blockId: String,
+ ): BlockFace {
for ((face, id) in descriptor.directionalVariants) {
if (id == blockId) return face
}
@@ -146,7 +155,11 @@ class AtlasBlockListener(
}
companion object {
- fun getDirectionalFacing(event: BlockPlaceEvent, descriptor: BlockDescriptor, opposite: Boolean = false): BlockFace {
+ fun getDirectionalFacing(
+ event: BlockPlaceEvent,
+ descriptor: BlockDescriptor,
+ opposite: Boolean = false,
+ ): BlockFace {
val raw = getPlayerFacing(event)
val facing = if (opposite) raw.oppositeFace else raw
if (descriptor.directionalVariants.containsKey(facing)) return facing
diff --git a/src/main/kotlin/com/coderjoe/atlas/core/BlockDescriptor.kt b/src/main/kotlin/com/coderjoe/atlas/core/BlockDescriptor.kt
index 11c4921..2fb2d45 100644
--- a/src/main/kotlin/com/coderjoe/atlas/core/BlockDescriptor.kt
+++ b/src/main/kotlin/com/coderjoe/atlas/core/BlockDescriptor.kt
@@ -6,7 +6,7 @@ import org.bukkit.block.BlockFace
enum class PlacementType {
SIMPLE,
DIRECTIONAL,
- DIRECTIONAL_OPPOSITE
+ DIRECTIONAL_OPPOSITE,
}
data class BlockDescriptor(
@@ -16,5 +16,5 @@ data class BlockDescriptor(
val placementType: PlacementType,
val directionalVariants: Map,
val allRegistrableIds: List,
- val constructor: (Location, BlockFace) -> AtlasBlock
+ val constructor: (Location, BlockFace) -> AtlasBlock,
)
diff --git a/src/main/kotlin/com/coderjoe/atlas/core/BlockFactory.kt b/src/main/kotlin/com/coderjoe/atlas/core/BlockFactory.kt
index a53e351..f45d9bd 100644
--- a/src/main/kotlin/com/coderjoe/atlas/core/BlockFactory.kt
+++ b/src/main/kotlin/com/coderjoe/atlas/core/BlockFactory.kt
@@ -6,11 +6,18 @@ import org.bukkit.block.BlockFace
open class BlockFactory {
private val blockConstructors = mutableMapOf T>()
- fun register(blockId: String, constructor: (Location, BlockFace) -> T) {
+ fun register(
+ blockId: String,
+ constructor: (Location, BlockFace) -> T,
+ ) {
blockConstructors[blockId] = constructor
}
- fun create(blockId: String, location: Location, facing: BlockFace = BlockFace.SELF): T? {
+ fun create(
+ blockId: String,
+ location: Location,
+ facing: BlockFace = BlockFace.SELF,
+ ): T? {
return blockConstructors[blockId]?.invoke(location, facing)
}
diff --git a/src/main/kotlin/com/coderjoe/atlas/core/BlockPersistence.kt b/src/main/kotlin/com/coderjoe/atlas/core/BlockPersistence.kt
index 9df85ed..2879dfe 100644
--- a/src/main/kotlin/com/coderjoe/atlas/core/BlockPersistence.kt
+++ b/src/main/kotlin/com/coderjoe/atlas/core/BlockPersistence.kt
@@ -13,7 +13,7 @@ class BlockPersistence(
private val yamlKey: String,
private val factory: BlockFactory,
private val serialize: (T, String) -> Map,
- private val restore: (T, Map) -> Unit
+ private val restore: (T, Map) -> Unit,
) {
private val dataFile = File(plugin.dataFolder, fileName)
@@ -26,13 +26,14 @@ class BlockPersistence(
val blockDataList = mutableListOf