Teleport all players from plot on clear and delete (fixes #3102)

This commit is contained in:
SirYwell 2021-06-21 18:19:50 +02:00
parent 56920fe833
commit ca9e371067
2 changed files with 8 additions and 4 deletions

View File

@ -104,8 +104,10 @@ public class Clear extends Command {
.hasPermission(player, "plots.continue"), TranslatableCaption.of("done.done_already_done")); .hasPermission(player, "plots.continue"), TranslatableCaption.of("done.done_already_done"));
confirm.run(this, () -> { confirm.run(this, () -> {
if (Settings.Teleport.ON_CLEAR) { 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, () -> { BackupManager.backup(player, plot, () -> {
final long start = System.currentTimeMillis(); final long start = System.currentTimeMillis();

View File

@ -107,8 +107,10 @@ public class Delete extends SubCommand {
} }
final long start = System.currentTimeMillis(); final long start = System.currentTimeMillis();
if (Settings.Teleport.ON_DELETE) { 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, () -> { boolean result = plot.getPlotModificationManager().deletePlot(player, () -> {
plot.removeRunning(); plot.removeRunning();