diff --git a/.github/workflows/gradle-deploy.yml b/.github/workflows/gradle-deploy.yml index 79a53c4..842d674 100644 --- a/.github/workflows/gradle-deploy.yml +++ b/.github/workflows/gradle-deploy.yml @@ -55,7 +55,7 @@ jobs: echo $URL echo $REPO_NAME ls build/libs - file=$(ls build/libs/ls-christmas-plugin-1.0-SNAPSHOT.jar) + file=$(ls build/libs/flyte-christmas-plugin.jar) curl "$URL&directory=/plugins" \ -H 'Content-Type: multipart/form-data' \ -F "files=@$file" \ diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 2749593..0000000 --- a/build.gradle +++ /dev/null @@ -1,90 +0,0 @@ -plugins { - id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.9.0' - id "io.github.patrick.remapper" version "1.4.0" - id 'com.github.johnrengelman.shadow' version '8.1.1' - id "io.papermc.paperweight.userdev" version "1.5.5" - id "xyz.jpenilla.run-paper" version "2.1.0" // Adds runServer and runMojangMappedServer tasks for testing -} - -group = 'com.learnspigot' -version = '1.0-SNAPSHOT' - -repositories { - mavenCentral() - mavenLocal() - maven { - name = "papermc-repo" - url = "https://repo.papermc.io/repository/maven-public/" - } - maven { - name = "sonatype" - url = "https://oss.sonatype.org/content/groups/public/" - } - maven { - name 'codemc-snapshots' - url 'https://repo.codemc.io/repository/maven-snapshots/' - } - maven { - url "https://repo.flyte.gg/releases" - } - maven { - url "https://jitpack.io" - } -} - -dependencies { - paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT") - implementation 'net.wesjd:anvilgui:1.7.0-SNAPSHOT' - implementation "org.mongodb:mongodb-driver-sync:4.9.0" - implementation "gg.flyte:twilight:1.0.30" - implementation "com.github.SuperGlueLib:LampWrapper:709c323c17" - compileOnly "com.github.koca2000:NoteBlockAPI:1.6.2" -} - -build.dependsOn(shadowJar) -remap.mustRunAfter(build) - -tasks { - remap { - version.set("1.20.1") - mustRunAfter build - } -} - -tasks { - // Configure reobfJar to run when invoking the build task - assemble.dependsOn(reobfJar) - - shadowJar { - def pack = "com.learnspigot.event.shaded." - relocate("gg.flyte.twilight", "${pack}twilight") - relocate("com.github.supergluelib.lamp", "${pack}lamp.wrapper") - relocate("revxrsal.commands", "${pack}lamp") - relocate("com.google.gson", "${pack}gson") - relocate("kotlin", "${pack}kotlin") - relocate("com.mongodb", "${pack}mongodb") - relocate("io.github.cdimascio.dotenv", "${pack}dotenv") - relocate("net.wesjd.anvilgui", "${pack}anvilgui") - relocate("org.bson", "${pack}bson") - relocate("org.bson", "${pack}bson") - relocate("org.intellij.lang.annotations", "${pack}jetbrains.annotations") - relocate("org.jetbrains.annotations", "${pack}jetbrains.annotations") - } -} - -def targetJavaVersion = 17 -java { - def javaVersion = JavaVersion.toVersion(targetJavaVersion) - sourceCompatibility = javaVersion - targetCompatibility = javaVersion - if (JavaVersion.current() < javaVersion) { - toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion) - } -} - -tasks.withType(JavaCompile).configureEach { - if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) { - options.release = targetJavaVersion - } -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..950dd58 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,55 @@ +plugins { + alias(libs.plugins.kotlin) + alias(libs.plugins.shadow) + alias(libs.plugins.paperweight) + alias(libs.plugins.run.paper) +} + +group = "gg.flyte" +version = "1.0.0" + +repositories { + maven("https://jitpack.io") + maven("https://repo.flyte.gg/releases") + maven("https://repo.papermc.io/repository/maven-public/") + maven("https://oss.sonatype.org/content/groups/public/") + maven("https://repo.codemc.io/repository/maven-snapshots/") +} + +dependencies { + paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT") + + implementation(libs.twilight) + implementation(libs.paperlib) + + implementation(libs.lamp.common) + implementation(libs.lamp.bukkit) + + implementation(libs.anvil.gui) + implementation(libs.mongodb) + compileOnly(libs.noteblock.api) +} + +tasks { + build { dependsOn(shadowJar) } + assemble { dependsOn(reobfJar) } + runServer { minecraftVersion("1.20.1") } + compileKotlin { kotlinOptions.jvmTarget = "17" } + reobfJar { outputJar.set(layout.buildDirectory.file("libs/flyte-christmas-plugin.jar")) } + + + shadowJar { + val pack = "gg.flyte.event.shaded." + relocate("gg.flyte.twilight", "${pack}twilight") + relocate("revxrsal.commands", "${pack}lamp") + relocate("com.google.gson", "${pack}gson") + relocate("kotlin", "${pack}kotlin") + relocate("com.mongodb", "${pack}mongodb") + relocate("io.github.cdimascio.dotenv", "${pack}dotenv") + relocate("net.wesjd.anvilgui", "${pack}anvilgui") + relocate("org.bson", "${pack}bson") + relocate("org.intellij.lang.annotations", "${pack}jetbrains.annotations") + relocate("org.jetbrains.annotations", "${pack}jetbrains.annotations") + relocate("io.papermc.lib", "${pack}paperlib") + } +} \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..2fba0c3 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,36 @@ +[versions] +# Plugins +kotlin = "1.9.20" +shadow = "8.1.1" +paperweight = "1.5.10" +run-paper = "2.2.2" + +# Libraries +twilight = "1.0.30" +paperlib = "1.0.7" +bstats = "3.0.2" +lamp = "3.1.8" +adventure = "4.14.0" +adventure-platform-bukkit = "4.3.1" + +[libraries] +twilight = { module = "gg.flyte:twilight", version.ref = "twilight" } +paperlib = { module = "io.papermc:paperlib", version.ref = "paperlib" } +bstats = { module = "org.bstats:bstats-bukkit", version.ref = "bstats" } + +lamp-common = { module = "com.github.Revxrsal.Lamp:common", version.ref = "lamp" } +lamp-bukkit = { module = "com.github.Revxrsal.Lamp:bukkit", version.ref = "lamp" } + +adventure = { module = "net.kyori:adventure", version.ref = "adventure" } +adventure-text-minimessage = { module = "net.kyori:adventure-text-minimessage", version.ref = "adventure" } +adventure-platform-bukkit = { module = "net.kyori:adventure-platform-bukkit", version.ref = "adventure-platform-bukkit" } + +anvil-gui = { module = "net.wesjd:anvilgui", version = "1.7.0-SNAPSHOT" } +mongodb = { module = "org.mongodb:mongodb-driver-sync", version = "4.9.0" } +noteblock-api = { module = "com.github.koca2000:NoteBlockAPI", version = "1.6.2" } + +[plugins] +kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" } +paperweight = { id = "io.papermc.paperweight.userdev", version.ref = "paperweight" } +run-paper = { id = "xyz.jpenilla.run-paper", version.ref = "run-paper" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 42defcc..744c64d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle.kts b/settings.gradle.kts index d8111f8..a0817f5 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,2 @@ - -rootProject.name = "ls-christmas-plugin" +rootProject.name = "flyte-christmas-plugin" diff --git a/src/main/kotlin/com/learnspigot/event/ChristmasEvent.kt b/src/main/kotlin/gg/flyte/event/ChristmasEvent.kt similarity index 65% rename from src/main/kotlin/com/learnspigot/event/ChristmasEvent.kt rename to src/main/kotlin/gg/flyte/event/ChristmasEvent.kt index d14507c..d05126f 100644 --- a/src/main/kotlin/com/learnspigot/event/ChristmasEvent.kt +++ b/src/main/kotlin/gg/flyte/event/ChristmasEvent.kt @@ -1,12 +1,13 @@ -package com.learnspigot.event +package gg.flyte.event -import com.learnspigot.event.debug.DebugCommand -import com.learnspigot.event.game.GameCommand -import com.learnspigot.event.game.GameType -import com.learnspigot.event.listener.ConnectionListener -import com.learnspigot.event.listener.MapListener -import com.learnspigot.event.util.MapLocation -import com.learnspigot.event.util.npc.NPCListener +import gg.flyte.event.debug.DebugCommand +import gg.flyte.event.game.GameCommand +import gg.flyte.event.game.GameType +import gg.flyte.event.listener.ConnectionListener +import gg.flyte.event.listener.MapListener +import gg.flyte.event.util.MapLocation + +import gg.flyte.event.util.npc.NPCListener import gg.flyte.twilight.event.custom.admin.listener.OpEventListener import gg.flyte.twilight.event.disableCustomEventListeners import gg.flyte.twilight.extension.enumValue @@ -38,7 +39,7 @@ class ChristmasEvent : JavaPlugin() { disableCustomEventListeners(OpEventListener) listeners() - commands() + CommandManager // TEST REMOVE /*NPC( @@ -53,35 +54,6 @@ class ChristmasEvent : JavaPlugin() { // TEST REMOVE } - override fun onDisable() { - - } - - private fun commands() { - BukkitCommandHandler.create(this).apply { - registerValueResolver(GameType::class.java) { - enumValue(it.pop()) ?: throw CommandErrorException("Invalid game type!", it.pop()) - } - - registerValueResolver(DebugCommand.WorldName::class.java) { DebugCommand.WorldName(it.pop()) } - - autoCompleter { - registerParameterSuggestions(GameType::class.java) { _, _, _ -> - GameType.entries.map { it.name.uppercase() } - } - - registerParameterSuggestions(DebugCommand.WorldName::class.java) { _, _, _ -> - Bukkit.getWorlds().map { it.name } - } - } - - register( - GameCommand, - DebugCommand - ) - } - } - private fun listeners() { ConnectionListener NPCListener diff --git a/src/main/kotlin/gg/flyte/event/CommandManager.kt b/src/main/kotlin/gg/flyte/event/CommandManager.kt new file mode 100644 index 0000000..3af252b --- /dev/null +++ b/src/main/kotlin/gg/flyte/event/CommandManager.kt @@ -0,0 +1,48 @@ +package gg.flyte.event + +import gg.flyte.event.debug.DebugCommand +import gg.flyte.event.game.GameCommand +import gg.flyte.event.game.GameType +import gg.flyte.twilight.Twilight +import gg.flyte.twilight.extension.enumValue +import org.bukkit.Bukkit +import revxrsal.commands.bukkit.BukkitCommandHandler +import revxrsal.commands.exception.CommandErrorException +import revxrsal.commands.ktx.autoCompleter + +object CommandManager { + + init { + BukkitCommandHandler.create(Twilight.plugin).apply { + registerAutoComplete() + registerCommands() + registerBrigadier() + } + } + + private fun BukkitCommandHandler.registerCommands() { + register( + GameCommand, + DebugCommand + ) + } + + private fun BukkitCommandHandler.registerAutoComplete() { + registerValueResolver(GameType::class.java) { + enumValue(it.pop()) ?: throw CommandErrorException("Invalid game type!", it.pop()) + } + + registerValueResolver(DebugCommand.WorldName::class.java) { DebugCommand.WorldName(it.pop()) } + + autoCompleter { + registerParameterSuggestions(GameType::class.java) { _, _, _ -> + GameType.entries.map { it.name.uppercase() } + } + + registerParameterSuggestions(DebugCommand.WorldName::class.java) { _, _, _ -> + Bukkit.getWorlds().map { it.name } + } + } + } + +} \ No newline at end of file diff --git a/src/main/kotlin/com/learnspigot/event/debug/DebugCommand.kt b/src/main/kotlin/gg/flyte/event/debug/DebugCommand.kt similarity index 95% rename from src/main/kotlin/com/learnspigot/event/debug/DebugCommand.kt rename to src/main/kotlin/gg/flyte/event/debug/DebugCommand.kt index 5477867..08d459b 100644 --- a/src/main/kotlin/com/learnspigot/event/debug/DebugCommand.kt +++ b/src/main/kotlin/gg/flyte/event/debug/DebugCommand.kt @@ -1,4 +1,4 @@ -package com.learnspigot.event.debug +package gg.flyte.event.debug import org.bukkit.Bukkit import org.bukkit.WorldCreator diff --git a/src/main/kotlin/com/learnspigot/event/game/Game.kt b/src/main/kotlin/gg/flyte/event/game/Game.kt similarity index 91% rename from src/main/kotlin/com/learnspigot/event/game/Game.kt rename to src/main/kotlin/gg/flyte/event/game/Game.kt index 0986971..8197453 100644 --- a/src/main/kotlin/com/learnspigot/event/game/Game.kt +++ b/src/main/kotlin/gg/flyte/event/game/Game.kt @@ -1,4 +1,4 @@ -package com.learnspigot.event.game +package gg.flyte.event.game import gg.flyte.twilight.event.TwilightListener import org.bukkit.entity.Player diff --git a/src/main/kotlin/com/learnspigot/event/game/GameCommand.kt b/src/main/kotlin/gg/flyte/event/game/GameCommand.kt similarity index 92% rename from src/main/kotlin/com/learnspigot/event/game/GameCommand.kt rename to src/main/kotlin/gg/flyte/event/game/GameCommand.kt index e486d9b..d1ed90b 100644 --- a/src/main/kotlin/com/learnspigot/event/game/GameCommand.kt +++ b/src/main/kotlin/gg/flyte/event/game/GameCommand.kt @@ -1,6 +1,6 @@ -package com.learnspigot.event.game +package gg.flyte.event.game -import com.learnspigot.event.game.main.MainGameEngine +import gg.flyte.event.game.main.MainGameEngine import net.kyori.adventure.text.Component import net.kyori.adventure.text.format.NamedTextColor import org.bukkit.Bukkit @@ -15,8 +15,8 @@ import revxrsal.commands.ktx.commandError @CommandPermission("admin") object GameCommand { - @DefaultFor - fun game() { + @DefaultFor("~", "~ help") + fun game(sender: CommandSender) { commandError("Invalid usage. Use /game set/start/stop [game].") } diff --git a/src/main/kotlin/com/learnspigot/event/game/GameType.kt b/src/main/kotlin/gg/flyte/event/game/GameType.kt similarity index 85% rename from src/main/kotlin/com/learnspigot/event/game/GameType.kt rename to src/main/kotlin/gg/flyte/event/game/GameType.kt index e1a10ea..617f99a 100644 --- a/src/main/kotlin/com/learnspigot/event/game/GameType.kt +++ b/src/main/kotlin/gg/flyte/event/game/GameType.kt @@ -1,11 +1,11 @@ -package com.learnspigot.event.game +package gg.flyte.event.game -import com.learnspigot.event.game.lobby.type.PresentHuntGame -import com.learnspigot.event.game.main.MainGame -import com.learnspigot.event.game.main.type.KingOfTheHillGame -import com.learnspigot.event.game.main.type.MusicalMinecartsGame -import com.learnspigot.event.game.main.type.SledRacingGame -import com.learnspigot.event.util.MapLocation +import gg.flyte.event.game.lobby.type.PresentHuntGame +import gg.flyte.event.game.main.MainGame +import gg.flyte.event.game.main.type.KingOfTheHillGame +import gg.flyte.event.game.main.type.MusicalMinecartsGame +import gg.flyte.event.game.main.type.SledRacingGame +import gg.flyte.event.util.MapLocation import net.kyori.adventure.text.Component import org.bukkit.GameMode import org.bukkit.util.BoundingBox diff --git a/src/main/kotlin/com/learnspigot/event/game/lobby/LobbyGame.kt b/src/main/kotlin/gg/flyte/event/game/lobby/LobbyGame.kt similarity index 56% rename from src/main/kotlin/com/learnspigot/event/game/lobby/LobbyGame.kt rename to src/main/kotlin/gg/flyte/event/game/lobby/LobbyGame.kt index d2c9306..2ce8047 100644 --- a/src/main/kotlin/com/learnspigot/event/game/lobby/LobbyGame.kt +++ b/src/main/kotlin/gg/flyte/event/game/lobby/LobbyGame.kt @@ -1,6 +1,6 @@ -package com.learnspigot.event.game.lobby +package gg.flyte.event.game.lobby -import com.learnspigot.event.game.Game +import gg.flyte.event.game.Game import org.bukkit.entity.Player abstract class LobbyGame : Game() { diff --git a/src/main/kotlin/com/learnspigot/event/game/lobby/LobbyGameEngine.kt b/src/main/kotlin/gg/flyte/event/game/lobby/LobbyGameEngine.kt similarity index 86% rename from src/main/kotlin/com/learnspigot/event/game/lobby/LobbyGameEngine.kt rename to src/main/kotlin/gg/flyte/event/game/lobby/LobbyGameEngine.kt index 34574ee..5686e34 100644 --- a/src/main/kotlin/com/learnspigot/event/game/lobby/LobbyGameEngine.kt +++ b/src/main/kotlin/gg/flyte/event/game/lobby/LobbyGameEngine.kt @@ -1,8 +1,8 @@ -package com.learnspigot.event.game.lobby +package gg.flyte.event.game.lobby -import com.learnspigot.event.ChristmasEvent -import com.learnspigot.event.game.GameCategory -import com.learnspigot.event.game.GameType +import gg.flyte.event.ChristmasEvent +import gg.flyte.event.game.GameCategory +import gg.flyte.event.game.GameType import gg.flyte.twilight.event.TwilightListener import gg.flyte.twilight.extension.applyForEach import gg.flyte.twilight.extension.clearActionBar diff --git a/src/main/kotlin/com/learnspigot/event/game/lobby/type/PresentHuntGame.kt b/src/main/kotlin/gg/flyte/event/game/lobby/type/PresentHuntGame.kt similarity index 90% rename from src/main/kotlin/com/learnspigot/event/game/lobby/type/PresentHuntGame.kt rename to src/main/kotlin/gg/flyte/event/game/lobby/type/PresentHuntGame.kt index b906c86..41b899a 100644 --- a/src/main/kotlin/com/learnspigot/event/game/lobby/type/PresentHuntGame.kt +++ b/src/main/kotlin/gg/flyte/event/game/lobby/type/PresentHuntGame.kt @@ -1,8 +1,8 @@ -package com.learnspigot.event.game.lobby.type +package gg.flyte.event.game.lobby.type -import com.learnspigot.event.game.lobby.LobbyGame -import com.learnspigot.event.game.lobby.LobbyGameEngine -import com.learnspigot.event.util.MapLocation +import gg.flyte.event.game.lobby.LobbyGame +import gg.flyte.event.game.lobby.LobbyGameEngine +import gg.flyte.event.util.MapLocation import gg.flyte.twilight.event.custom.interact.PlayerMainHandInteractEvent import gg.flyte.twilight.event.event import gg.flyte.twilight.extension.applyForEach diff --git a/src/main/kotlin/com/learnspigot/event/game/main/MainGame.kt b/src/main/kotlin/gg/flyte/event/game/main/MainGame.kt similarity index 73% rename from src/main/kotlin/com/learnspigot/event/game/main/MainGame.kt rename to src/main/kotlin/gg/flyte/event/game/main/MainGame.kt index 0eb35c7..5476c5d 100644 --- a/src/main/kotlin/com/learnspigot/event/game/main/MainGame.kt +++ b/src/main/kotlin/gg/flyte/event/game/main/MainGame.kt @@ -1,6 +1,6 @@ -package com.learnspigot.event.game.main +package gg.flyte.event.game.main -import com.learnspigot.event.game.Game +import gg.flyte.event.game.Game import org.bukkit.entity.Player import java.util.* diff --git a/src/main/kotlin/com/learnspigot/event/game/main/MainGameEngine.kt b/src/main/kotlin/gg/flyte/event/game/main/MainGameEngine.kt similarity index 96% rename from src/main/kotlin/com/learnspigot/event/game/main/MainGameEngine.kt rename to src/main/kotlin/gg/flyte/event/game/main/MainGameEngine.kt index 5acf002..41c41ad 100644 --- a/src/main/kotlin/com/learnspigot/event/game/main/MainGameEngine.kt +++ b/src/main/kotlin/gg/flyte/event/game/main/MainGameEngine.kt @@ -1,8 +1,8 @@ -package com.learnspigot.event.game.main +package gg.flyte.event.game.main -import com.learnspigot.event.ChristmasEvent.Companion.LOBBY_SPAWN -import com.learnspigot.event.game.GameType -import com.learnspigot.event.game.lobby.LobbyGameEngine +import gg.flyte.event.ChristmasEvent.Companion.LOBBY_SPAWN +import gg.flyte.event.game.GameType +import gg.flyte.event.game.lobby.LobbyGameEngine import gg.flyte.twilight.event.TwilightListener import gg.flyte.twilight.extension.applyForEach import gg.flyte.twilight.extension.clearActionBar diff --git a/src/main/kotlin/com/learnspigot/event/game/main/MainGameState.kt b/src/main/kotlin/gg/flyte/event/game/main/MainGameState.kt similarity index 58% rename from src/main/kotlin/com/learnspigot/event/game/main/MainGameState.kt rename to src/main/kotlin/gg/flyte/event/game/main/MainGameState.kt index ac969e4..3e0a933 100644 --- a/src/main/kotlin/com/learnspigot/event/game/main/MainGameState.kt +++ b/src/main/kotlin/gg/flyte/event/game/main/MainGameState.kt @@ -1,4 +1,4 @@ -package com.learnspigot.event.game.main +package gg.flyte.event.game.main enum class MainGameState { diff --git a/src/main/kotlin/com/learnspigot/event/game/main/type/BlockPartyGame.kt b/src/main/kotlin/gg/flyte/event/game/main/type/BlockPartyGame.kt similarity index 93% rename from src/main/kotlin/com/learnspigot/event/game/main/type/BlockPartyGame.kt rename to src/main/kotlin/gg/flyte/event/game/main/type/BlockPartyGame.kt index 6f6f4ce..36f13a2 100644 --- a/src/main/kotlin/com/learnspigot/event/game/main/type/BlockPartyGame.kt +++ b/src/main/kotlin/gg/flyte/event/game/main/type/BlockPartyGame.kt @@ -1,8 +1,8 @@ -package com.learnspigot.event.game.main.type +package gg.flyte.event.game.main.type -import com.learnspigot.event.game.main.MainGame -import com.learnspigot.event.game.main.MainGameEngine -import com.learnspigot.event.util.NBSSongType +import gg.flyte.event.game.main.MainGame +import gg.flyte.event.game.main.MainGameEngine +import gg.flyte.event.util.NBSSongType import com.xxmicloxx.NoteBlockAPI.model.RepeatMode import com.xxmicloxx.NoteBlockAPI.songplayer.RadioSongPlayer import gg.flyte.twilight.event.event @@ -95,7 +95,8 @@ class BlockPartyGame : MainGame() { while (iterator.hasNext()) { val player = iterator.next() if (player.location.y <= RESPAWN_Y) { - Bukkit.broadcastMessage("${player.name} was elmimnated") + Bukkit.broadcast(Component.text("${player.name} was eliminated")) + player.apply { inventory.storageContents = emptyArray() inventory.setItemInOffHand(null) diff --git a/src/main/kotlin/com/learnspigot/event/game/main/type/KingOfTheHillGame.kt b/src/main/kotlin/gg/flyte/event/game/main/type/KingOfTheHillGame.kt similarity index 96% rename from src/main/kotlin/com/learnspigot/event/game/main/type/KingOfTheHillGame.kt rename to src/main/kotlin/gg/flyte/event/game/main/type/KingOfTheHillGame.kt index f492686..2a5023f 100644 --- a/src/main/kotlin/com/learnspigot/event/game/main/type/KingOfTheHillGame.kt +++ b/src/main/kotlin/gg/flyte/event/game/main/type/KingOfTheHillGame.kt @@ -1,8 +1,8 @@ -package com.learnspigot.event.game.main.type +package gg.flyte.event.game.main.type -import com.learnspigot.event.game.GameType -import com.learnspigot.event.game.main.MainGame -import com.learnspigot.event.game.main.MainGameEngine +import gg.flyte.event.game.GameType +import gg.flyte.event.game.main.MainGame +import gg.flyte.event.game.main.MainGameEngine import gg.flyte.twilight.event.event import gg.flyte.twilight.extension.* import gg.flyte.twilight.scheduler.repeat diff --git a/src/main/kotlin/com/learnspigot/event/game/main/type/MusicalMinecartsGame.kt b/src/main/kotlin/gg/flyte/event/game/main/type/MusicalMinecartsGame.kt similarity index 93% rename from src/main/kotlin/com/learnspigot/event/game/main/type/MusicalMinecartsGame.kt rename to src/main/kotlin/gg/flyte/event/game/main/type/MusicalMinecartsGame.kt index 644eefa..02e2449 100644 --- a/src/main/kotlin/com/learnspigot/event/game/main/type/MusicalMinecartsGame.kt +++ b/src/main/kotlin/gg/flyte/event/game/main/type/MusicalMinecartsGame.kt @@ -1,11 +1,11 @@ -package com.learnspigot.event.game.main.type - -import com.learnspigot.event.ChristmasEvent -import com.learnspigot.event.game.main.MainGame -import com.learnspigot.event.game.main.MainGameEngine -import com.learnspigot.event.game.GameType -import com.learnspigot.event.util.MapLocation -import com.learnspigot.event.util.NBSSongType +package gg.flyte.event.game.main.type + +import gg.flyte.event.ChristmasEvent +import gg.flyte.event.game.main.MainGame +import gg.flyte.event.game.main.MainGameEngine +import gg.flyte.event.game.GameType +import gg.flyte.event.util.MapLocation +import gg.flyte.event.util.NBSSongType import com.xxmicloxx.NoteBlockAPI.model.RepeatMode import com.xxmicloxx.NoteBlockAPI.songplayer.RadioSongPlayer import gg.flyte.twilight.event.event @@ -89,7 +89,7 @@ class MusicalMinecartsGame : MainGame() { Bukkit.getOnlinePlayers().applyForEach { playSound(Sound.BLOCK_NOTE_BLOCK_BASEDRUM) } // SPAWNING MINECARTS - val potentialSpawnLocations = MINECART_SPAWN.getLocations(ChristmasEvent.WORLD) + val potentialSpawnLocations = MINECART_SPAWN.getLocations(gg.flyte.event.ChristmasEvent.WORLD) kotlin.repeat((alive.size * 0.66).roundToInt()) { minecarts += potentialSpawnLocations.random().spawnEntity(EntityType.MINECART) as Minecart } diff --git a/src/main/kotlin/com/learnspigot/event/game/main/type/SledRacingGame.kt b/src/main/kotlin/gg/flyte/event/game/main/type/SledRacingGame.kt similarity index 87% rename from src/main/kotlin/com/learnspigot/event/game/main/type/SledRacingGame.kt rename to src/main/kotlin/gg/flyte/event/game/main/type/SledRacingGame.kt index bfebaa7..8de1457 100644 --- a/src/main/kotlin/com/learnspigot/event/game/main/type/SledRacingGame.kt +++ b/src/main/kotlin/gg/flyte/event/game/main/type/SledRacingGame.kt @@ -1,9 +1,9 @@ -package com.learnspigot.event.game.main.type +package gg.flyte.event.game.main.type -import com.learnspigot.event.ChristmasEvent -import com.learnspigot.event.game.main.MainGame -import com.learnspigot.event.game.main.MainGameEngine -import com.learnspigot.event.util.MapLocation +import gg.flyte.event.ChristmasEvent +import gg.flyte.event.game.main.MainGame +import gg.flyte.event.game.main.MainGameEngine +import gg.flyte.event.util.MapLocation import gg.flyte.twilight.event.event import gg.flyte.twilight.extension.applyForEach import gg.flyte.twilight.extension.contains @@ -37,7 +37,7 @@ class SledRacingGame : MainGame() { private val boats = mutableMapOf() init { - STARTING_WALL.getBlocks(ChristmasEvent.WORLD).applyForEach { type = Material.OAK_FENCE } + STARTING_WALL.getBlocks(gg.flyte.event.ChristmasEvent.WORLD).applyForEach { type = Material.OAK_FENCE } Bukkit.getOnlinePlayers().forEach { player -> (player.world.spawnEntity(player.location, EntityType.BOAT) as Boat).apply { @@ -61,7 +61,7 @@ class SledRacingGame : MainGame() { override fun start() { startTime = System.currentTimeMillis() - STARTING_WALL.getBlocks(ChristmasEvent.WORLD).applyForEach { type = Material.AIR } + STARTING_WALL.getBlocks(gg.flyte.event.ChristmasEvent.WORLD).applyForEach { type = Material.AIR } var timer = 60.0 tasks += repeat(5) { diff --git a/src/main/kotlin/com/learnspigot/event/listener/ConnectionListener.kt b/src/main/kotlin/gg/flyte/event/listener/ConnectionListener.kt similarity index 92% rename from src/main/kotlin/com/learnspigot/event/listener/ConnectionListener.kt rename to src/main/kotlin/gg/flyte/event/listener/ConnectionListener.kt index 2120a31..2bf3118 100644 --- a/src/main/kotlin/com/learnspigot/event/listener/ConnectionListener.kt +++ b/src/main/kotlin/gg/flyte/event/listener/ConnectionListener.kt @@ -1,9 +1,9 @@ -package com.learnspigot.event.listener +package gg.flyte.event.listener -import com.learnspigot.event.ChristmasEvent.Companion.LOBBY_SPAWN -import com.learnspigot.event.game.main.MainGameEngine -import com.learnspigot.event.util.npc.NPC -import com.learnspigot.event.visual.TablistManager +import gg.flyte.event.ChristmasEvent.Companion.LOBBY_SPAWN +import gg.flyte.event.game.main.MainGameEngine +import gg.flyte.event.util.npc.NPC +import gg.flyte.event.visual.TablistManager import gg.flyte.twilight.event.event import gg.flyte.twilight.scheduler.delay import net.kyori.adventure.text.Component.text diff --git a/src/main/kotlin/com/learnspigot/event/listener/MapListener.kt b/src/main/kotlin/gg/flyte/event/listener/MapListener.kt similarity index 94% rename from src/main/kotlin/com/learnspigot/event/listener/MapListener.kt rename to src/main/kotlin/gg/flyte/event/listener/MapListener.kt index 401f144..6c98304 100644 --- a/src/main/kotlin/com/learnspigot/event/listener/MapListener.kt +++ b/src/main/kotlin/gg/flyte/event/listener/MapListener.kt @@ -1,4 +1,4 @@ -package com.learnspigot.event.listener +package gg.flyte.event.listener import gg.flyte.twilight.event.event import org.bukkit.entity.EntityType diff --git a/src/main/kotlin/com/learnspigot/event/util/MapLocation.kt b/src/main/kotlin/gg/flyte/event/util/MapLocation.kt similarity index 72% rename from src/main/kotlin/com/learnspigot/event/util/MapLocation.kt rename to src/main/kotlin/gg/flyte/event/util/MapLocation.kt index 523d632..3c357c2 100644 --- a/src/main/kotlin/com/learnspigot/event/util/MapLocation.kt +++ b/src/main/kotlin/gg/flyte/event/util/MapLocation.kt @@ -1,6 +1,6 @@ -package com.learnspigot.event.util +package gg.flyte.event.util -import com.learnspigot.event.ChristmasEvent.Companion.WORLD +import gg.flyte.event.ChristmasEvent.Companion.WORLD import org.bukkit.Location data class MapLocation( diff --git a/src/main/kotlin/com/learnspigot/event/util/Message.kt b/src/main/kotlin/gg/flyte/event/util/Message.kt similarity index 73% rename from src/main/kotlin/com/learnspigot/event/util/Message.kt rename to src/main/kotlin/gg/flyte/event/util/Message.kt index 3c1087d..273c2df 100644 --- a/src/main/kotlin/com/learnspigot/event/util/Message.kt +++ b/src/main/kotlin/gg/flyte/event/util/Message.kt @@ -1,4 +1,4 @@ -package com.learnspigot.event.util +package gg.flyte.event.util import net.kyori.adventure.text.format.TextColor diff --git a/src/main/kotlin/com/learnspigot/event/util/NBSSongType.kt b/src/main/kotlin/gg/flyte/event/util/NBSSongType.kt similarity index 78% rename from src/main/kotlin/com/learnspigot/event/util/NBSSongType.kt rename to src/main/kotlin/gg/flyte/event/util/NBSSongType.kt index 9874640..03a56cd 100644 --- a/src/main/kotlin/com/learnspigot/event/util/NBSSongType.kt +++ b/src/main/kotlin/gg/flyte/event/util/NBSSongType.kt @@ -1,12 +1,12 @@ -package com.learnspigot.event.util +package gg.flyte.event.util -import com.learnspigot.event.ChristmasEvent +import gg.flyte.event.ChristmasEvent import com.xxmicloxx.NoteBlockAPI.model.Song import com.xxmicloxx.NoteBlockAPI.utils.NBSDecoder import java.io.File private fun parse(fileName: String): Song { - return NBSDecoder.parse(File("${ChristmasEvent.INSTANCE.dataFolder}/music", fileName)) + return NBSDecoder.parse(File("${gg.flyte.event.ChristmasEvent.INSTANCE.dataFolder}/music", fileName)) } enum class NBSSongType(val title: String, val song: Song) { diff --git a/src/main/kotlin/com/learnspigot/event/util/Skin.kt b/src/main/kotlin/gg/flyte/event/util/Skin.kt similarity index 63% rename from src/main/kotlin/com/learnspigot/event/util/Skin.kt rename to src/main/kotlin/gg/flyte/event/util/Skin.kt index 75d48b2..35a6afd 100644 --- a/src/main/kotlin/com/learnspigot/event/util/Skin.kt +++ b/src/main/kotlin/gg/flyte/event/util/Skin.kt @@ -1,3 +1,3 @@ -package com.learnspigot.event.util +package gg.flyte.event.util data class Skin(val texture: String, val signature: String) \ No newline at end of file diff --git a/src/main/kotlin/com/learnspigot/event/util/npc/NPC.kt b/src/main/kotlin/gg/flyte/event/util/npc/NPC.kt similarity index 96% rename from src/main/kotlin/com/learnspigot/event/util/npc/NPC.kt rename to src/main/kotlin/gg/flyte/event/util/npc/NPC.kt index 78f1af0..9ed9eea 100644 --- a/src/main/kotlin/com/learnspigot/event/util/npc/NPC.kt +++ b/src/main/kotlin/gg/flyte/event/util/npc/NPC.kt @@ -1,7 +1,7 @@ -package com.learnspigot.event.util.npc +package gg.flyte.event.util.npc -import com.learnspigot.event.ChristmasEvent -import com.learnspigot.event.util.Skin +import gg.flyte.event.ChristmasEvent +import gg.flyte.event.util.Skin import com.mojang.authlib.GameProfile import com.mojang.authlib.properties.Property import net.minecraft.network.protocol.game.* @@ -64,7 +64,7 @@ class NPC( } if (followPlayer) { - runTaskTimer(ChristmasEvent.INSTANCE, 5, 5) + runTaskTimer(gg.flyte.event.ChristmasEvent.INSTANCE, 5, 5) } } diff --git a/src/main/kotlin/com/learnspigot/event/util/npc/NPCClickEvent.kt b/src/main/kotlin/gg/flyte/event/util/npc/NPCClickEvent.kt similarity index 91% rename from src/main/kotlin/com/learnspigot/event/util/npc/NPCClickEvent.kt rename to src/main/kotlin/gg/flyte/event/util/npc/NPCClickEvent.kt index b7bba3f..52dee92 100644 --- a/src/main/kotlin/com/learnspigot/event/util/npc/NPCClickEvent.kt +++ b/src/main/kotlin/gg/flyte/event/util/npc/NPCClickEvent.kt @@ -1,4 +1,4 @@ -package com.learnspigot.event.util.npc +package gg.flyte.event.util.npc import org.bukkit.entity.Player import org.bukkit.event.Event diff --git a/src/main/kotlin/com/learnspigot/event/util/npc/NPCListener.kt b/src/main/kotlin/gg/flyte/event/util/npc/NPCListener.kt similarity index 90% rename from src/main/kotlin/com/learnspigot/event/util/npc/NPCListener.kt rename to src/main/kotlin/gg/flyte/event/util/npc/NPCListener.kt index b11751f..8cb4b7f 100644 --- a/src/main/kotlin/com/learnspigot/event/util/npc/NPCListener.kt +++ b/src/main/kotlin/gg/flyte/event/util/npc/NPCListener.kt @@ -1,4 +1,4 @@ -package com.learnspigot.event.util.npc +package gg.flyte.event.util.npc import gg.flyte.twilight.event.event import org.bukkit.Bukkit diff --git a/src/main/kotlin/com/learnspigot/event/visual/TablistManager.kt b/src/main/kotlin/gg/flyte/event/visual/TablistManager.kt similarity index 97% rename from src/main/kotlin/com/learnspigot/event/visual/TablistManager.kt rename to src/main/kotlin/gg/flyte/event/visual/TablistManager.kt index 851323b..0e695f9 100644 --- a/src/main/kotlin/com/learnspigot/event/visual/TablistManager.kt +++ b/src/main/kotlin/gg/flyte/event/visual/TablistManager.kt @@ -1,7 +1,7 @@ -package com.learnspigot.event.visual +package gg.flyte.event.visual -import com.learnspigot.event.ChristmasEvent -import com.learnspigot.event.util.CHRISTMAS_RED +import gg.flyte.event.ChristmasEvent +import gg.flyte.event.util.CHRISTMAS_RED import com.mojang.authlib.GameProfile import com.mojang.authlib.properties.Property import gg.flyte.twilight.string.smallText diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 3d8143c..5c7693d 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: ChristmasEvent -version: 1.0 -main: com.learnspigot.event.ChristmasEvent -api-version: 1.20 -contributors: [Stephen, Josh] -website: https://learnspigot.com +version: 1.0.0 +main: gg.flyte.event.ChristmasEvent +api-version: '1.20' +contributors: [Flyte] +website: https://flyte.gg depend: [NoteBlockAPI] \ No newline at end of file