mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-10 10:10:31 +01:00
feat: Split configuration for teleport on claim/auto (#3308)
- Fixes #2953
This commit is contained in:
parent
30d06b7801
commit
c1163cdb2e
@ -556,8 +556,10 @@ public class Settings extends Config {
|
||||
public static boolean ON_DEATH = false;
|
||||
@Comment("Teleport to your plot on login")
|
||||
public static boolean ON_LOGIN = false;
|
||||
@Comment("Teleport to your plot on claim")
|
||||
@Comment("Teleport to your plot on claim (/plot claim)")
|
||||
public static boolean ON_CLAIM = true;
|
||||
@Comment("Teleport to your plot on auto (/plot auto)")
|
||||
public static boolean ON_AUTO = true;
|
||||
@Comment({"Add a delay to all teleport commands (in seconds)",
|
||||
"Assign `plots.teleport.delay.bypass` to bypass the cooldown"})
|
||||
public static int DELAY = 0;
|
||||
|
@ -1708,9 +1708,14 @@ public class Plot {
|
||||
}
|
||||
this.getPlotModificationManager().setSign(player.getName());
|
||||
player.sendMessage(TranslatableCaption.of("working.claimed"), Template.of("plot", this.getId().toString()));
|
||||
if (teleport && Settings.Teleport.ON_CLAIM) {
|
||||
teleportPlayer(player, auto ? TeleportCause.COMMAND_AUTO : TeleportCause.COMMAND_CLAIM, result -> {
|
||||
});
|
||||
if (teleport) {
|
||||
if (!auto && Settings.Teleport.ON_CLAIM) {
|
||||
teleportPlayer(player, TeleportCause.COMMAND_CLAIM, result -> {
|
||||
});
|
||||
} else if (auto && Settings.Teleport.ON_AUTO) {
|
||||
teleportPlayer(player, TeleportCause.COMMAND_AUTO, result -> {
|
||||
});
|
||||
}
|
||||
}
|
||||
PlotArea plotworld = getArea();
|
||||
if (plotworld.isSchematicOnClaim()) {
|
||||
|
Loading…
Reference in New Issue
Block a user