mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-28 17:38:01 +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) {
|
||||
if (Settings.Teleport.PER_WORLD_VISIT) {
|
||||
plotQuery.relativeToArea(player.getApplicablePlotArea())
|
||||
// Player may not be in a plot world when attempting to get to a plot home
|
||||
PlotArea area = player.getApplicablePlotArea();
|
||||
if (Settings.Teleport.PER_WORLD_VISIT && area != null) {
|
||||
plotQuery.relativeToArea(area)
|
||||
.withSortingStrategy(SortingStrategy.SORT_BY_CREATION);
|
||||
} else {
|
||||
plotQuery.withSortingStrategy(SortingStrategy.SORT_BY_TEMP);
|
||||
|
Loading…
Reference in New Issue
Block a user