Update velocity-api to 3.5.0-SNAPSHOT, adjust event priority annotations, and reconfigure repository URLs in settings.gradle.kts.

This commit is contained in:
akastijn 2026-01-31 23:45:19 +01:00
parent ea8e952108
commit fc20c9a276
4 changed files with 7 additions and 10 deletions

View File

@ -9,13 +9,12 @@ val nexusPass = providers.gradleProperty("alttdSnapshotPassword").get()
dependencyResolutionManagement { dependencyResolutionManagement {
repositories { repositories {
// mavenLocal() mavenLocal()
mavenCentral() mavenCentral()
maven("https://repo.alttd.com/snapshots") // Altitude - Galaxy maven("https://repo.alttd.com/snapshots") // Altitude - Galaxy
maven("https://oss.sonatype.org/content/groups/public/") // Adventure maven("https://oss.sonatype.org/content/groups/public/") // Adventure
maven("https://oss.sonatype.org/content/repositories/snapshots/") // Minimessage maven("https://oss.sonatype.org/content/repositories/snapshots/") // Minimessage
maven("https://nexus.velocitypowered.com/repository/") // Velocity maven("https://repo.papermc.io/repository/maven-public/")
maven("https://nexus.velocitypowered.com/repository/maven-public/") // Velocity
maven("https://repo.spongepowered.org/maven") // Configurate maven("https://repo.spongepowered.org/maven") // Configurate
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/") // Papi maven("https://repo.extendedclip.com/content/repositories/placeholderapi/") // Papi
maven("https://jitpack.io") maven("https://jitpack.io")

View File

@ -5,8 +5,8 @@ plugins {
dependencies { dependencies {
implementation(project(":api")) // API implementation(project(":api")) // API
compileOnly("com.velocitypowered:velocity-api:3.1.0") compileOnly("com.velocitypowered:velocity-api:3.5.0-SNAPSHOT")
annotationProcessor("com.velocitypowered:velocity-api:3.1.0") annotationProcessor("com.velocitypowered:velocity-api:3.5.0-SNAPSHOT")
implementation("mysql:mysql-connector-java:8.0.33") // mysql implementation("mysql:mysql-connector-java:8.0.33") // mysql
implementation("org.spongepowered", "configurate-yaml", "4.2.0") implementation("org.spongepowered", "configurate-yaml", "4.2.0")
compileOnly("net.kyori:adventure-text-minimessage:4.23.0") compileOnly("net.kyori:adventure-text-minimessage:4.23.0")

View File

@ -5,7 +5,6 @@ import com.alttd.chat.util.Utility;
import com.alttd.velocitychat.VelocityChat; import com.alttd.velocitychat.VelocityChat;
import com.alttd.velocitychat.events.GlobalAdminChatEvent; import com.alttd.velocitychat.events.GlobalAdminChatEvent;
import com.velocitypowered.api.command.CommandSource; import com.velocitypowered.api.command.CommandSource;
import com.velocitypowered.api.event.PostOrder;
import com.velocitypowered.api.event.Subscribe; import com.velocitypowered.api.event.Subscribe;
import com.velocitypowered.api.proxy.Player; import com.velocitypowered.api.proxy.Player;
import net.kyori.adventure.text.ComponentLike; import net.kyori.adventure.text.ComponentLike;
@ -19,7 +18,7 @@ public class ChatListener {
plugin = VelocityChat.getPlugin(); plugin = VelocityChat.getPlugin();
} }
@Subscribe(order = PostOrder.FIRST) @Subscribe(priority = 0)
public void onGlobalStaffChat(GlobalAdminChatEvent event) { public void onGlobalStaffChat(GlobalAdminChatEvent event) {
String senderName = Config.CONSOLENAME; String senderName = Config.CONSOLENAME;
String serverName = "Altitude"; String serverName = "Altitude";

View File

@ -11,7 +11,6 @@ import com.alttd.velocitychat.VelocityChat;
import com.alttd.velocitychat.commands.vote_to_mute.ActiveVoteToMute; import com.alttd.velocitychat.commands.vote_to_mute.ActiveVoteToMute;
import com.alttd.velocitychat.data.ServerWrapper; import com.alttd.velocitychat.data.ServerWrapper;
import com.alttd.velocitychat.handlers.ServerHandler; import com.alttd.velocitychat.handlers.ServerHandler;
import com.velocitypowered.api.event.PostOrder;
import com.velocitypowered.api.event.Subscribe; import com.velocitypowered.api.event.Subscribe;
import com.velocitypowered.api.event.connection.DisconnectEvent; import com.velocitypowered.api.event.connection.DisconnectEvent;
import com.velocitypowered.api.event.connection.LoginEvent; import com.velocitypowered.api.event.connection.LoginEvent;
@ -34,7 +33,7 @@ import java.util.concurrent.TimeUnit;
public class ProxyPlayerListener { public class ProxyPlayerListener {
@Subscribe(order = PostOrder.FIRST) @Subscribe(priority = 0)
public void onPlayerLogin(LoginEvent event) { public void onPlayerLogin(LoginEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
UUID uuid = player.getUniqueId(); UUID uuid = player.getUniqueId();
@ -57,7 +56,7 @@ public class ProxyPlayerListener {
ServerHandler.addPlayerUUID(player.getUsername(), uuid); ServerHandler.addPlayerUUID(player.getUsername(), uuid);
} }
@Subscribe(order = PostOrder.LAST) @Subscribe(priority = 4)
public void afterPlayerLogin(ServerPostConnectEvent event) { public void afterPlayerLogin(ServerPostConnectEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
RegisteredServer previousServer = event.getPreviousServer(); RegisteredServer previousServer = event.getPreviousServer();