Fork changes

This commit is contained in:
Evert Prants 2024-04-15 20:00:30 +03:00
parent 891584611c
commit 82d6c04d58
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
5 changed files with 19 additions and 25 deletions

View File

@ -3,17 +3,17 @@ plugins {
id 'com.github.johnrengelman.shadow' version '7.0.0'
}
sourceCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
group 'com.actualplayer'
version '1.2.3'
version '1.2.4'
description 'A way for the user to login to the server he last connected to.'
repositories {
mavenCentral()
maven {
name = "velocity"
setUrl("https://repo.velocitypowered.com/snapshots/")
name = "papermc"
setUrl("https://repo.papermc.io/repository/maven-public/")
}
maven {
setUrl("https://repo.spongepowered.org/maven")
@ -29,13 +29,13 @@ repositories {
defaultTasks 'clean', 'build', 'shadowJar'
dependencies {
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.8'
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.8'
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.32'
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.32'
implementation group: 'net.luckperms', name: 'api', version: '5.3'
implementation group: 'net.luckperms', name: 'api', version: '5.4'
compileOnly group: 'com.velocitypowered', name: 'velocity-api', version: '1.1.5'
annotationProcessor group: 'com.velocitypowered', name: 'velocity-api', version: '1.1.5'
compileOnly group: 'com.velocitypowered', name: 'velocity-api', version: '3.3.0-SNAPSHOT'
annotationProcessor group: 'com.velocitypowered', name: 'velocity-api', version: '3.3.0-SNAPSHOT'
}
blossom {
@ -44,7 +44,3 @@ blossom {
replaceToken '@VERSION@', version
replaceToken '@DESCRIPTION@', description
}
configurations {
runtime.exclude group:'me.lucko.luckperms'
}

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0
gradlew vendored Normal file → Executable file
View File

View File

@ -22,7 +22,7 @@ import java.nio.file.Path;
import java.util.concurrent.CancellationException;
import java.util.concurrent.CompletionException;
@Plugin(id = "@ID@", name = "@NAME@", version = "@VERSION@", description = "@DESCRIPTION@", authors = {"ActualPlayer"}, dependencies = { @Dependency(id = "luckperms", optional = true) })
@Plugin(id = "@ID@", name = "@NAME@", version = "@VERSION@", description = "@DESCRIPTION@", authors = {"ActualPlayer", "evert"}, dependencies = {@Dependency(id = "luckperms", optional = true)})
public class RememberMe {
@Getter
@ -47,12 +47,13 @@ public class RememberMe {
}
@Inject(optional = true)
public void initLuckPerms(@Named("luckperms")PluginContainer luckPermsContainer) {
public void initLuckPerms(@Named("luckperms") PluginContainer luckPermsContainer) {
this.hasLuckPerms = luckPermsContainer != null;
}
/**
* If LuckPerms is present, use the User meta tags to save last server
*
* @param event Velocity init event
*/
@Subscribe
@ -76,7 +77,7 @@ public class RememberMe {
getServer().getServer(lastServerName).ifPresent((registeredServer) -> {
try {
registeredServer.ping().join();
} catch(CancellationException|CompletionException exception) {
} catch (CancellationException | CompletionException exception) {
return;
}
chooseServerEvent.setInitialServer(registeredServer);

View File

@ -5,9 +5,6 @@ import com.actualplayer.rememberme.models.UserServer;
import com.actualplayer.rememberme.util.FileUtils;
import com.actualplayer.rememberme.util.YamlUtils;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.gson.GsonConfigurationLoader;
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
import java.io.File;
import java.io.IOException;