mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 20:56:45 +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);
|
return CompletableFuture.completedFuture(false);
|
||||||
}
|
}
|
||||||
query.withSortingStrategy(SortingStrategy.SORT_BY_TEMP);
|
sortBySettings(query, player);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// either plot id or alias
|
// either plot id or alias
|
||||||
@ -202,7 +202,7 @@ public class HomeCommand extends Command {
|
|||||||
query.withPlot(plot);
|
query.withPlot(plot);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
query.withSortingStrategy(SortingStrategy.SORT_BY_TEMP);
|
sortBySettings(query, player);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (basePlotOnly) {
|
if (basePlotOnly) {
|
||||||
@ -212,6 +212,15 @@ public class HomeCommand extends Command {
|
|||||||
return CompletableFuture.completedFuture(true);
|
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
|
@Override
|
||||||
public Collection<Command> tab(PlotPlayer player, String[] args, boolean space) {
|
public Collection<Command> tab(PlotPlayer player, String[] args, boolean space) {
|
||||||
final List<Command> completions = new ArrayList<>();
|
final List<Command> completions = new ArrayList<>();
|
||||||
|
@ -98,8 +98,13 @@ public class Visit extends Command {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sortByArea != null) {
|
PlotArea relativeArea = sortByArea;
|
||||||
query.relativeToArea(sortByArea).withSortingStrategy(SortingStrategy.SORT_BY_CREATION);
|
if (Settings.Teleport.PER_WORLD_VISIT && sortByArea == null) {
|
||||||
|
relativeArea = player.getApplicablePlotArea();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (relativeArea != null) {
|
||||||
|
query.relativeToArea(relativeArea).withSortingStrategy(SortingStrategy.SORT_BY_CREATION);
|
||||||
} else {
|
} else {
|
||||||
query.withSortingStrategy(SortingStrategy.SORT_BY_TEMP);
|
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
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
Loading…
Reference in New Issue
Block a user