mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-25 20:16:00 +01:00
Fix sometimes using a world as command-parameter doesnt find the maps to use
This commit is contained in:
parent
47b0c60a7f
commit
3913878e20
@ -749,13 +749,18 @@ public int updateCommand(CommandContext<S> context, boolean force) {
|
||||
if (worldToRender != null) {
|
||||
plugin.getServerInterface().persistWorldChanges(worldToRender.getUUID());
|
||||
for (BmMap map : plugin.getMapTypes()) {
|
||||
if (map.getWorld().equals(worldToRender)) maps.add(map);
|
||||
if (map.getWorld().getUUID().equals(worldToRender.getUUID())) maps.add(map);
|
||||
}
|
||||
} else {
|
||||
plugin.getServerInterface().persistWorldChanges(mapToRender.getWorld().getUUID());
|
||||
maps.add(mapToRender);
|
||||
}
|
||||
|
||||
if (maps.isEmpty()) {
|
||||
source.sendMessage(Text.of(TextColor.RED, "No map has been found for this world that could be updated!"));
|
||||
return;
|
||||
}
|
||||
|
||||
for (BmMap map : maps) {
|
||||
MapUpdateTask updateTask = new MapUpdateTask(map, center, radius);
|
||||
plugin.getRenderManager().scheduleRenderTask(updateTask);
|
||||
|
Loading…
Reference in New Issue
Block a user