Fork changes
This commit is contained in:
parent
891584611c
commit
82d6c04d58
22
build.gradle
22
build.gradle
@ -3,17 +3,17 @@ plugins {
|
|||||||
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
|
||||||
group 'com.actualplayer'
|
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.'
|
description 'A way for the user to login to the server he last connected to.'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven {
|
maven {
|
||||||
name = "velocity"
|
name = "papermc"
|
||||||
setUrl("https://repo.velocitypowered.com/snapshots/")
|
setUrl("https://repo.papermc.io/repository/maven-public/")
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
setUrl("https://repo.spongepowered.org/maven")
|
setUrl("https://repo.spongepowered.org/maven")
|
||||||
@ -29,13 +29,13 @@ repositories {
|
|||||||
defaultTasks 'clean', 'build', 'shadowJar'
|
defaultTasks 'clean', 'build', 'shadowJar'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly 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.8'
|
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'
|
compileOnly group: 'com.velocitypowered', name: 'velocity-api', version: '3.3.0-SNAPSHOT'
|
||||||
annotationProcessor group: 'com.velocitypowered', name: 'velocity-api', version: '1.1.5'
|
annotationProcessor group: 'com.velocitypowered', name: 'velocity-api', version: '3.3.0-SNAPSHOT'
|
||||||
}
|
}
|
||||||
|
|
||||||
blossom {
|
blossom {
|
||||||
@ -44,7 +44,3 @@ blossom {
|
|||||||
replaceToken '@VERSION@', version
|
replaceToken '@VERSION@', version
|
||||||
replaceToken '@DESCRIPTION@', description
|
replaceToken '@DESCRIPTION@', description
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
|
||||||
runtime.exclude group:'me.lucko.luckperms'
|
|
||||||
}
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
@ -22,7 +22,7 @@ import java.nio.file.Path;
|
|||||||
import java.util.concurrent.CancellationException;
|
import java.util.concurrent.CancellationException;
|
||||||
import java.util.concurrent.CompletionException;
|
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 {
|
public class RememberMe {
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@ -47,12 +47,13 @@ public class RememberMe {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Inject(optional = true)
|
@Inject(optional = true)
|
||||||
public void initLuckPerms(@Named("luckperms")PluginContainer luckPermsContainer) {
|
public void initLuckPerms(@Named("luckperms") PluginContainer luckPermsContainer) {
|
||||||
this.hasLuckPerms = luckPermsContainer != null;
|
this.hasLuckPerms = luckPermsContainer != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If LuckPerms is present, use the User meta tags to save last server
|
* If LuckPerms is present, use the User meta tags to save last server
|
||||||
|
*
|
||||||
* @param event Velocity init event
|
* @param event Velocity init event
|
||||||
*/
|
*/
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@ -74,12 +75,12 @@ public class RememberMe {
|
|||||||
handler.getLastServerName(chooseServerEvent.getPlayer().getUniqueId()).thenAcceptAsync(lastServerName -> {
|
handler.getLastServerName(chooseServerEvent.getPlayer().getUniqueId()).thenAcceptAsync(lastServerName -> {
|
||||||
if (lastServerName != null) {
|
if (lastServerName != null) {
|
||||||
getServer().getServer(lastServerName).ifPresent((registeredServer) -> {
|
getServer().getServer(lastServerName).ifPresent((registeredServer) -> {
|
||||||
try {
|
try {
|
||||||
registeredServer.ping().join();
|
registeredServer.ping().join();
|
||||||
} catch(CancellationException|CompletionException exception) {
|
} catch (CancellationException | CompletionException exception) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
chooseServerEvent.setInitialServer(registeredServer);
|
chooseServerEvent.setInitialServer(registeredServer);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).join();
|
}).join();
|
||||||
|
@ -5,9 +5,6 @@ import com.actualplayer.rememberme.models.UserServer;
|
|||||||
import com.actualplayer.rememberme.util.FileUtils;
|
import com.actualplayer.rememberme.util.FileUtils;
|
||||||
import com.actualplayer.rememberme.util.YamlUtils;
|
import com.actualplayer.rememberme.util.YamlUtils;
|
||||||
import com.velocitypowered.api.proxy.server.RegisteredServer;
|
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.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
Loading…
Reference in New Issue
Block a user