mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-08-19 22:13:03 +02:00
Use Settings.Teleport.ON_LOGIN
This commit is contained in:
parent
815e513093
commit
ea26ec628d
|
@ -541,7 +541,7 @@ public abstract class PlotPlayer implements CommandCaller, OfflinePlotPlayer {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Settings.Enabled_Components.PERSISTENT_META) {
|
if (!Settings.Teleport.ON_LOGIN) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PlotAreaManager manager = PlotSquared.get().getPlotAreaManager();
|
PlotAreaManager manager = PlotSquared.get().getPlotAreaManager();
|
||||||
|
|
|
@ -7,6 +7,8 @@ import com.github.intellectualsites.plotsquared.plot.flag.Flag;
|
||||||
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
|
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
|
||||||
import com.github.intellectualsites.plotsquared.plot.listener.PlayerBlockEventType;
|
import com.github.intellectualsites.plotsquared.plot.listener.PlayerBlockEventType;
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.*;
|
import com.github.intellectualsites.plotsquared.plot.object.*;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotArea;
|
||||||
|
import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotAreaManager;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager;
|
import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
@ -75,7 +77,7 @@ public abstract class EventUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final Plot plot = player.getCurrentPlot();
|
final Plot plot = player.getCurrentPlot();
|
||||||
if (Settings.Teleport.ON_LOGIN && plot != null) {
|
if (Settings.Teleport.ON_LOGIN && plot != null && !(plot.getArea() instanceof SinglePlotArea)) {
|
||||||
TaskManager.runTask(() -> plot.teleportPlayer(player));
|
TaskManager.runTask(() -> plot.teleportPlayer(player));
|
||||||
MainUtil.sendMessage(player,
|
MainUtil.sendMessage(player,
|
||||||
Captions.TELEPORTED_TO_ROAD.f() + " (on-login) " + "(" + plot.getId().x + ";" + plot
|
Captions.TELEPORTED_TO_ROAD.f() + " (on-login) " + "(" + plot.getId().x + ";" + plot
|
||||||
|
|
Loading…
Reference in New Issue
Block a user