mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 12:25:46 +01:00
Teleport all players from plot on clear and delete (fixes #3102)
This commit is contained in:
parent
56920fe833
commit
ca9e371067
@ -104,8 +104,10 @@ public class Clear extends Command {
|
||||
.hasPermission(player, "plots.continue"), TranslatableCaption.of("done.done_already_done"));
|
||||
confirm.run(this, () -> {
|
||||
if (Settings.Teleport.ON_CLEAR) {
|
||||
plot.teleportPlayer(player, TeleportCause.COMMAND, result -> {
|
||||
});
|
||||
plot.getPlayersInPlot().forEach(playerInPlot -> plot.teleportPlayer(playerInPlot, TeleportCause.COMMAND,
|
||||
result -> {
|
||||
}
|
||||
));
|
||||
}
|
||||
BackupManager.backup(player, plot, () -> {
|
||||
final long start = System.currentTimeMillis();
|
||||
|
@ -107,8 +107,10 @@ public class Delete extends SubCommand {
|
||||
}
|
||||
final long start = System.currentTimeMillis();
|
||||
if (Settings.Teleport.ON_DELETE) {
|
||||
plot.teleportPlayer(player, TeleportCause.COMMAND, result -> {
|
||||
});
|
||||
plot.getPlayersInPlot().forEach(playerInPlot -> plot.teleportPlayer(playerInPlot, TeleportCause.COMMAND,
|
||||
result -> {
|
||||
}
|
||||
));
|
||||
}
|
||||
boolean result = plot.getPlotModificationManager().deletePlot(player, () -> {
|
||||
plot.removeRunning();
|
||||
|
Loading…
Reference in New Issue
Block a user