Skip to content

Commit

Permalink
Prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
NichtStudioCode committed Jul 4, 2021
1 parent c1caca2 commit 5ec7329
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>xyz.xenondevs</groupId>
<artifactId>Nova</artifactId>
<version>0.2-SNAPSHOT</version>
<version>0.2</version>

<properties>
<kotlin.version>1.5.20</kotlin.version>
Expand Down
8 changes: 8 additions & 0 deletions src/main/kotlin/xyz/xenondevs/nova/Nova.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package xyz.xenondevs.nova

import de.studiocode.invui.resourcepack.ForceResourcePack
import org.bstats.bukkit.Metrics
import org.bukkit.plugin.java.JavaPlugin
import xyz.xenondevs.nova.ability.AbilityManager
import xyz.xenondevs.nova.advancement.AdvancementManager
Expand Down Expand Up @@ -48,6 +49,13 @@ class Nova : JavaPlugin() {
AbilityManager.init()
VisualRegion.init()

if (IS_VERSION_CHANGE) {
NovaConfig["resource_pack.url"] = NovaConfig.fallbackConfig.getString("resource_pack.url")!!
NovaConfig.save(true)
}

Metrics(this, 11927)

forceResourcePack()
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/xyz/xenondevs/nova/config/NovaConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import java.io.File

object NovaConfig : JsonConfig(File("plugins/Nova/config.json"), false) {

private val fallbackConfig = JsonConfig(
val fallbackConfig = JsonConfig(
JSON_PARSER.parse(getResourceAsStream("config/config.json")!!.reader()).asJsonObject
)

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"resource_pack": {
"enabled": true,
"url": "https://github.com/xenondevs/NovaRP/releases/download/v0.1/NovaRP.zip"
"url": "https://github.com/xenondevs/NovaRP/releases/download/v0.2/NovaRP.zip"
},
"cable": {
"basic": {
Expand Down

0 comments on commit 5ec7329

Please sign in to comment.