mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-30 11:05:27 +02:00
Compare commits
1 Commits
feat/v7/pa
...
renovate/s
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7e0f03b120 |
@@ -49,12 +49,10 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Registry that contains {@link Placeholder placeholders}
|
||||
@@ -129,22 +127,6 @@ public final class PlaceholderRegistry {
|
||||
}
|
||||
return legacyComponent(TranslatableCaption.of("info.unknown"), player);
|
||||
});
|
||||
this.createPlaceholder("currentplot_owners", (player, plot) -> {
|
||||
if (plot.getFlag(ServerPlotFlag.class)) {
|
||||
return legacyComponent(TranslatableCaption.of("info.server"), player);
|
||||
}
|
||||
final Set<UUID> plotOwners = plot.getOwners();
|
||||
if (plotOwners.isEmpty()) {
|
||||
return legacyComponent(TranslatableCaption.of("generic.generic_unowned"), player);
|
||||
}
|
||||
return plotOwners.stream().map(PlotSquared.platform().playerManager()::getUsernameCaption).map(f -> {
|
||||
try {
|
||||
return f.get(Settings.UUID.BLOCKING_TIMEOUT, TimeUnit.MILLISECONDS).getComponent(player);
|
||||
} catch (final Exception ignored) {
|
||||
return legacyComponent(TranslatableCaption.of("info.unknown"), player);
|
||||
}
|
||||
}).collect(Collectors.joining(", "));
|
||||
});
|
||||
this.createPlaceholder("currentplot_members", (player, plot) -> {
|
||||
if (plot.getMembers().isEmpty() && plot.getTrusted().isEmpty()) {
|
||||
return legacyComponent(TranslatableCaption.of("info.none"), player);
|
||||
|
@@ -35,7 +35,7 @@ serverlib = "2.3.7"
|
||||
# Gradle plugins
|
||||
shadow = "8.3.8"
|
||||
grgit = "4.1.1"
|
||||
spotless = "7.2.0"
|
||||
spotless = "7.2.1"
|
||||
publish = "0.34.0"
|
||||
runPaper = "2.3.1"
|
||||
|
||||
|
Reference in New Issue
Block a user