mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 12:46:46 +01:00
Merge branch 'v5' into v6
This commit is contained in:
commit
496fe09f78
@ -140,7 +140,7 @@ public class HomeCommand extends Command {
|
||||
);
|
||||
return CompletableFuture.completedFuture(false);
|
||||
}
|
||||
query.withSortingStrategy(SortingStrategy.SORT_BY_TEMP);
|
||||
sortBySettings(query, player);
|
||||
break;
|
||||
}
|
||||
// either plot id or alias
|
||||
@ -202,7 +202,7 @@ public class HomeCommand extends Command {
|
||||
query.withPlot(plot);
|
||||
break;
|
||||
case 0:
|
||||
query.withSortingStrategy(SortingStrategy.SORT_BY_TEMP);
|
||||
sortBySettings(query, player);
|
||||
break;
|
||||
}
|
||||
if (basePlotOnly) {
|
||||
@ -212,6 +212,15 @@ public class HomeCommand extends Command {
|
||||
return CompletableFuture.completedFuture(true);
|
||||
}
|
||||
|
||||
private void sortBySettings(PlotQuery plotQuery, PlotPlayer<?> player) {
|
||||
if (Settings.Teleport.PER_WORLD_VISIT) {
|
||||
plotQuery.relativeToArea(player.getApplicablePlotArea())
|
||||
.withSortingStrategy(SortingStrategy.SORT_BY_CREATION);
|
||||
} else {
|
||||
plotQuery.withSortingStrategy(SortingStrategy.SORT_BY_TEMP);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Command> tab(PlotPlayer player, String[] args, boolean space) {
|
||||
final List<Command> completions = new ArrayList<>();
|
||||
|
@ -98,8 +98,13 @@ public class Visit extends Command {
|
||||
return;
|
||||
}
|
||||
|
||||
if (sortByArea != null) {
|
||||
query.relativeToArea(sortByArea).withSortingStrategy(SortingStrategy.SORT_BY_CREATION);
|
||||
PlotArea relativeArea = sortByArea;
|
||||
if (Settings.Teleport.PER_WORLD_VISIT && sortByArea == null) {
|
||||
relativeArea = player.getApplicablePlotArea();
|
||||
}
|
||||
|
||||
if (relativeArea != null) {
|
||||
query.relativeToArea(relativeArea).withSortingStrategy(SortingStrategy.SORT_BY_CREATION);
|
||||
} else {
|
||||
query.withSortingStrategy(SortingStrategy.SORT_BY_TEMP);
|
||||
}
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
Loading…
Reference in New Issue
Block a user