Skip to content

Commit

Permalink
Fixed EffKickPlayerFromCloud and other bugs, prepared for 1.6 release
Browse files Browse the repository at this point in the history
  • Loading branch information
byPixelTV committed Apr 19, 2024
1 parent d737ce3 commit 2174773
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = "de.bypixeltv"
version = "1.6"
version = "1.6.0"

repositories {
mavenCentral()
Expand Down Expand Up @@ -40,7 +40,7 @@ dependencies {
implementation("eu.cloudnetservice.cloudnet:platform-inject-support:4.0.0-RC10")
implementation("eu.cloudnetservice.cloudnet:common:4.0.0-RC10")
implementation("eu.cloudnetservice.cloudnet:node:4.0.0-RC10")
implementation("org.json:json:20231013")
implementation("org.json:json:20240303")
}

sourceSets {
Expand Down
14 changes: 7 additions & 7 deletions src/main/kotlin/de/bypixeltv/skcloudnet/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Main : KSpigot() {
e.printStackTrace()
}

server.consoleSender.sendMessage(miniMessages.deserialize("<color:#43fa00>Enabling SkCloudnet ${this.description.version}...</color>"))
server.consoleSender.sendMessage(miniMessages.deserialize("<color:#43fa00>Enabling SkCloudnet v${this.description.version}...</color>"))
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(miniMessages.deserialize("<color:#43fa00> _____ _ _____ _ _ _ </color>"))
Expand All @@ -51,28 +51,28 @@ class Main : KSpigot() {
server.consoleSender.sendMessage(miniMessages.deserialize("<yellow>Made by byPixelTV</yellow>"))
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(miniMessages.deserialize("<aqua>Successfully enabled SkCloudnet ${this.description.version}!</aqua>"))
server.consoleSender.sendMessage(miniMessages.deserialize("<aqua>Successfully enabled SkCloudnet v${this.description.version}!</aqua>"))


val githubVersion = GetVersion().getLatestAddonVersion()?.replace("v", "")?.toDouble()
if (githubVersion != null) {
if (githubVersion > this.description.version.replace("v", "").toDouble()) {
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(miniMessages.deserialize("<color:#43fa00>There is an update available for SkCloudnet!</color> <aqua>You're on version <yellow>${this.description.version}</yellow> and the latest version is <yellow>$githubVersion</yellow></aqua>!\n\n<color:#43fa00>Download the latest version here:</color> <blue>https://github.com/byPixelTV/SkCloudnet/releases</blue> <aqua>"))
server.consoleSender.sendMessage(miniMessages.deserialize("<color:#43fa00>There is an update available for SkCloudnet!</color> <aqua>You're on version <yellow>v${this.description.version}</yellow> and the latest version is <yellow>$githubVersion</yellow></aqua>!\n\n<color:#43fa00>Download the latest version here:</color> <blue>https://github.com/byPixelTV/SkCloudnet/releases</blue> <aqua>"))
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(" ")
} else {
if (githubVersion == this.description.version.replace("v", "").toDouble()) {
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(miniMessages.deserialize("<color:#43fa00>You're on the latest version of SkCloudnet!</color> <aqua>Version <yellow>${this.description.version}</yellow></aqua>"))
server.consoleSender.sendMessage(miniMessages.deserialize("<color:#43fa00>You're on the latest version of SkCloudnet!</color> <aqua>Version <yellow>v${this.description.version}</yellow></aqua>"))
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(" ")
} else if (githubVersion < this.description.version.replace("v", "").toDouble()) {
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(miniMessages.deserialize("<color:#ff0000>You're running a development version of SkCloudnet! Please note that this version may contain bugs!</color> <aqua>Version <color:#ff0000>${this.description.version}</color> > <color:#43fa00>${GetVersion().getLatestAddonVersion()}</color></aqua>"))
server.consoleSender.sendMessage(miniMessages.deserialize("<color:#ff0000>You're running a development version of SkCloudnet! Please note that this version may contain bugs!</color> <aqua>Version <color:#ff0000>v${this.description.version}</color> > <color:#43fa00>${GetVersion().getLatestAddonVersion()}</color></aqua>"))
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(" ")
}
Expand All @@ -99,7 +99,7 @@ class Main : KSpigot() {

override fun shutdown() {
CommandAPI.onDisable()
server.consoleSender.sendMessage(miniMessages.deserialize("<color:#ff0000>Disabling SkCloudnet ${this.description.version}...</color>"))
server.consoleSender.sendMessage(miniMessages.deserialize("<color:#ff0000>Disabling SkCloudnet v${this.description.version}...</color>"))
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(miniMessages.deserialize("<color:#ff0000> _____ _ _____ _ _ _ </color>"))
Expand All @@ -111,7 +111,7 @@ class Main : KSpigot() {
server.consoleSender.sendMessage(miniMessages.deserialize("<yellow>Made by byPixelTV</yellow>"))
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(" ")
server.consoleSender.sendMessage(miniMessages.deserialize("<aqua>Successfully disabled SkCloudnet ${this.description.version}!</aqua>"))
server.consoleSender.sendMessage(miniMessages.deserialize("<aqua>Successfully disabled SkCloudnet v${this.description.version}!</aqua>"))
}

fun getMainInstance(): Main? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class EffKickPlayerFromCloud : Effect() {
override fun execute(event: Event?) {
val player = this.player?.getSingle(event)
var reason = this.reason?.getSingle(event)
val playerExecutor = player?.let { playerManager.playerExecutor(it.uniqueId) }
if (reason == null) {
reason = " "
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
main: "de.bypixeltv.skcloudnet.Main"
name: "SkCloudnet"
version: "v1.6"
version: "1.6.0"
api-version: "1.20"

author: "byPixelTV"
Expand All @@ -11,6 +11,6 @@ libraries:
- "dev.jorel:commandapi-bukkit-shade:9.3.0"
- "dev.jorel:commandapi-bukkit-kotlin:9.3.0"
- "net.axay:kspigot:1.20.3"
- "org.json:json:20231013"
- "org.json:json:20240303"

depend: [Skript]

0 comments on commit 2174773

Please sign in to comment.