mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Allow players to /plot home from non-plot-areas if per-world-teleport is enabled
This commit is contained in:
parent
5ab8d50b86
commit
dd36036334
@ -212,8 +212,10 @@ public class HomeCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void sortBySettings(PlotQuery plotQuery, PlotPlayer<?> player) {
|
private void sortBySettings(PlotQuery plotQuery, PlotPlayer<?> player) {
|
||||||
if (Settings.Teleport.PER_WORLD_VISIT) {
|
// Player may not be in a plot world when attempting to get to a plot home
|
||||||
plotQuery.relativeToArea(player.getApplicablePlotArea())
|
PlotArea area = player.getApplicablePlotArea();
|
||||||
|
if (Settings.Teleport.PER_WORLD_VISIT && area != null) {
|
||||||
|
plotQuery.relativeToArea(area)
|
||||||
.withSortingStrategy(SortingStrategy.SORT_BY_CREATION);
|
.withSortingStrategy(SortingStrategy.SORT_BY_CREATION);
|
||||||
} else {
|
} else {
|
||||||
plotQuery.withSortingStrategy(SortingStrategy.SORT_BY_TEMP);
|
plotQuery.withSortingStrategy(SortingStrategy.SORT_BY_TEMP);
|
||||||
|
Loading…
Reference in New Issue
Block a user