Skip to content

Commit

Permalink
Chore: Pushing code that does not work lol
Browse files Browse the repository at this point in the history
  • Loading branch information
byPixelTV committed Oct 3, 2024
1 parent 5b5effc commit 977db80
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 21 deletions.
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ dependencies {
implementation("dev.jorel:commandapi-velocity-shade:9.6.0-SNAPSHOT")
implementation("jakarta.inject:jakarta.inject-api:2.0.1")

// Lombok dependencies
annotationProcessor("org.projectlombok:lombok:1.18.34")
compileOnly("org.projectlombok:lombok:1.18.34")

compileOnly("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")

compileOnly("eu.cloudnetservice.cloudnet:syncproxy:4.0.0-RC10")
Expand Down
8 changes: 5 additions & 3 deletions src/main/kotlin/de/bypixeltv/redivelocity/RediVelocity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import de.bypixeltv.redivelocity.config.ConfigLoader
import de.bypixeltv.redivelocity.listeners.*
import de.bypixeltv.redivelocity.managers.RedisController
import de.bypixeltv.redivelocity.managers.UpdateManager
import de.bypixeltv.redivelocity.utils.CloudNetUtils
import de.bypixeltv.redivelocity.utils.ProxyIdGenerator
import dev.jorel.commandapi.CommandAPI
import dev.jorel.commandapi.CommandAPIVelocityConfig
import eu.cloudnetservice.wrapper.holder.ServiceInfoHolder
import jakarta.inject.Inject
import jakarta.inject.Provider
import jakarta.inject.Singleton
Expand All @@ -25,7 +25,8 @@ class RediVelocity @Inject constructor(
private val metricsFactory: Metrics.Factory,
private val proxyIdGenerator: ProxyIdGenerator,
private val updateManager: UpdateManager,
private val rediVelocityCommandProvider: Provider<RediVelocityCommand>
private val rediVelocityCommandProvider: Provider<RediVelocityCommand>,
private val serviceInfoHolder: ServiceInfoHolder
) {

init {
Expand Down Expand Up @@ -72,7 +73,7 @@ class RediVelocity @Inject constructor(
// Generate new proxy id
proxyId = if (config.cloudnet.enabled) {
if (config.cloudnet.cloudnetUseServiceId) {
CloudNetUtils().getServicename()
serviceInfoHolder.serviceInfo().name()
} else {
proxyIdGenerator.generate()
}
Expand Down Expand Up @@ -100,6 +101,7 @@ class RediVelocity @Inject constructor(
proxy.eventManager.register(this, ServerSwitchListener(this, config))
proxy.eventManager.register(this, PostLoginListener(this, config))
proxy.eventManager.register(this, DisconnectListener(this, config))
proxy.eventManager.register(this, ResourcePackListeners(proxy, config))

if (config.playerCountSync) {
proxy.eventManager.register(this, ProxyPingListener(this))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class RediVelocityCommand @Inject constructor(
fun register() {
CommandAPICommand("redivelocity")
.withAliases("rv", "rediv", "redisvelocity", "redisv")
.withPermission("redivelocity.admin")
.withSubcommands(
CommandAPICommand("player")
.withSubcommands(
Expand Down Expand Up @@ -276,7 +275,11 @@ class RediVelocityCommand @Inject constructor(
sender.sendMessage(miniMessage.deserialize("$prefix <gray>Currently blacklisted players:<br>$blacklistedPlayersPrettyString</gray>"))
}
})
)
),
CommandAPICommand("info")
.executes(CommandExecutor { sender, _ ->
sender.sendMessage(miniMessage.deserialize("$prefix <gray>Running <aqua>RediVelocity</aqua> version <aqua>${proxy.pluginManager.getPlugin("RediVelocity").get().description.version.get()}</aqua> made by <aqua>byPixelTV</aqua><br>$prefix Download: <aqua><click:open_url:'https://github.com/byPixelTV/RediVelocity'>https://github.com/byPixelTV/RediVelocity</click><br>$prefix Support: <aqua><click:open_url:'https://discord.gg/UvEC8C2vPy'>https://discord.gg/UvEC8C2vPy</click></aqua></gray>"))
}),
)
.register()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.bypixeltv.redivelocity.listeners

import com.velocitypowered.api.event.Continuation
import com.velocitypowered.api.event.EventTask
import com.velocitypowered.api.event.Subscribe
import com.velocitypowered.api.event.player.PlayerResourcePackStatusEvent
import com.velocitypowered.api.event.player.configuration.PlayerFinishConfigurationEvent
Expand Down
15 changes: 0 additions & 15 deletions src/main/kotlin/de/bypixeltv/redivelocity/utils/CloudNetUtils.kt

This file was deleted.

0 comments on commit 977db80

Please sign in to comment.