mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-03-14 15:49:56 +01:00
Bump squirrelid to 0.3.0, Deprecated PaperProfileServer (replaced by squirrelid)
This commit is contained in:
parent
093e282e13
commit
621c1289b3
@ -35,7 +35,7 @@
|
||||
group = "${rootProject.group}.worldguard-libs"
|
||||
|
||||
val relocations = mapOf(
|
||||
"com.sk89q.squirrelid" to "com.sk89q.worldguard.util.profile"
|
||||
"org.enginehub.squirrelid" to "com.sk89q.worldguard.util.profile"
|
||||
)
|
||||
|
||||
tasks.register<ShadowJar>("jar") {
|
||||
|
@ -98,7 +98,7 @@
|
||||
relocate("org.flywaydb", "com.sk89q.worldguard.internal.flywaydb") {
|
||||
include(dependency("org.flywaydb:flyway-core:3.0"))
|
||||
}
|
||||
relocate("com.sk89q.squirrelid", "com.sk89q.worldguard.util.profile")
|
||||
relocate("org.enginehub.squirrelid", "com.sk89q.worldguard.util.profile")
|
||||
exclude("com.google.code.findbugs:jsr305")
|
||||
}
|
||||
exclude("GradleStart**")
|
||||
|
@ -3,7 +3,7 @@
|
||||
// const val AUTO_VALUE = "1.6.5"
|
||||
const val WORLDEDIT = "7.2.6-SNAPSHOT"
|
||||
const val JUNIT = "5.7.0"
|
||||
const val SQUIRRELID = "0.2.0"
|
||||
const val SQUIRRELID = "0.3.0"
|
||||
const val GUAVA = "21.0"
|
||||
const val MOCKITO = "3.7.7"
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
import com.sk89q.worldguard.WorldGuard;
|
||||
import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion;
|
||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
||||
import com.sk89q.worldguard.util.profile.resolver.PaperProfileService;
|
||||
import com.sk89q.worldguard.util.profile.resolver.PaperPlayerService;
|
||||
import com.sk89q.worldguard.bukkit.protection.events.flags.FlagContextCreateEvent;
|
||||
import com.sk89q.worldguard.bukkit.session.BukkitSessionManager;
|
||||
import com.sk89q.worldguard.bukkit.util.report.PerformanceReport;
|
||||
@ -251,7 +251,7 @@ public ProfileService createProfileService(ProfileCache profileCache) {
|
||||
List<ProfileService> services = new ArrayList<>();
|
||||
if (PaperLib.isPaper()) {
|
||||
// Paper has a shared cache
|
||||
services.add(PaperProfileService.getInstance());
|
||||
services.add(PaperPlayerService.getInstance());
|
||||
} else {
|
||||
services.add(BukkitPlayerService.getInstance());
|
||||
}
|
||||
|
@ -19,14 +19,19 @@
|
||||
|
||||
package com.sk89q.worldguard.util.profile.resolver;
|
||||
|
||||
//import com.destroystokyo.paper.profile.PlayerProfile;
|
||||
import com.sk89q.worldguard.util.profile.Profile;
|
||||
import io.papermc.lib.PaperLib;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.IOException;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link com.sk89q.worldguard.util.profile.resolver.PaperPlayerService} instead
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
public final class PaperProfileService extends SingleRequestService {
|
||||
private static final PaperPlayerService SUPER = PaperPlayerService.getInstance();
|
||||
private static final PaperProfileService INSTANCE = new PaperProfileService();
|
||||
|
||||
private PaperProfileService() {
|
||||
@ -37,18 +42,19 @@ private PaperProfileService() {
|
||||
|
||||
@Override
|
||||
public int getIdealRequestLimit() {
|
||||
return Integer.MAX_VALUE;
|
||||
return SUPER.getIdealRequestLimit();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Profile findByName(String name) {
|
||||
/* PlayerProfile profile = Bukkit.createProfile(name);
|
||||
if (profile.completeFromCache()) {
|
||||
//noinspection ConstantConditions - completeFromCache guarantees non-null on success
|
||||
return new Profile(profile.getId(), profile.getName());
|
||||
}*/
|
||||
return null;
|
||||
public Profile findByName(String name) throws IOException, InterruptedException {
|
||||
return SUPER.findByName(name);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Profile findByUuid(UUID uuid) throws IOException, InterruptedException {
|
||||
return SUPER.findByUuid(uuid);
|
||||
}
|
||||
|
||||
public static PaperProfileService getInstance() {
|
||||
|
@ -1,6 +1,6 @@
|
||||
applyLibrariesConfiguration()
|
||||
|
||||
dependencies {
|
||||
"shade"("com.sk89q:squirrelid:${Versions.SQUIRRELID}")
|
||||
"shade"("org.enginehub:squirrelid:${Versions.SQUIRRELID}")
|
||||
"shade"("org.khelekore:prtree:1.5.0")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user