From 0eec9a007aeda2c03b0d5a97e988f9f45bbdee9a Mon Sep 17 00:00:00 2001 From: Brettflan Date: Sun, 21 Apr 2013 20:08:36 -0500 Subject: [PATCH] Fix for Fill command potentially running on wrong world if specified by player with "fill confirm" command not specifying world --- src/com/wimbli/WorldBorder/WBCommand.java | 6 +++--- src/com/wimbli/WorldBorder/WorldFillTask.java | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/com/wimbli/WorldBorder/WBCommand.java b/src/com/wimbli/WorldBorder/WBCommand.java index dd58d29..199fd28 100644 --- a/src/com/wimbli/WorldBorder/WBCommand.java +++ b/src/com/wimbli/WorldBorder/WBCommand.java @@ -613,7 +613,7 @@ public class WBCommand implements CommandExecutor pad = split[2]; String world = ""; - if (player != null) + if (player != null && !cancel && !confirm && !pause) world = player.getWorld().getName(); if (!cancel && !confirm && !pause && world.isEmpty()) @@ -949,7 +949,7 @@ public class WBCommand implements CommandExecutor { int task = plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, Config.fillTask, ticks, ticks); Config.fillTask.setTaskID(task); - sender.sendMessage("WorldBorder map generation task started."); + sender.sendMessage("WorldBorder map generation for world \"" + fillWorld + "\" task started."); } else sender.sendMessage(clrErr + "The world map generation task failed to start."); @@ -1053,7 +1053,7 @@ public class WBCommand implements CommandExecutor { int task = plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, Config.trimTask, ticks, ticks); Config.trimTask.setTaskID(task); - sender.sendMessage("WorldBorder map trimming task started."); + sender.sendMessage("WorldBorder map trimming task for world \"" + trimWorld + "\" started."); } else sender.sendMessage(clrErr + "The world map trimming task failed to start."); diff --git a/src/com/wimbli/WorldBorder/WorldFillTask.java b/src/com/wimbli/WorldBorder/WorldFillTask.java index 12a0e75..7d837f8 100644 --- a/src/com/wimbli/WorldBorder/WorldFillTask.java +++ b/src/com/wimbli/WorldBorder/WorldFillTask.java @@ -328,7 +328,6 @@ public class WorldFillTask implements Runnable if (!originalChunks.contains(coord)) world.unloadChunkRequest(coord.x, coord.z); } - } // is this task still valid/workable?