mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2025-02-18 05:21:56 +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) {
|
if (worldToRender != null) {
|
||||||
plugin.getServerInterface().persistWorldChanges(worldToRender.getUUID());
|
plugin.getServerInterface().persistWorldChanges(worldToRender.getUUID());
|
||||||
for (BmMap map : plugin.getMapTypes()) {
|
for (BmMap map : plugin.getMapTypes()) {
|
||||||
if (map.getWorld().equals(worldToRender)) maps.add(map);
|
if (map.getWorld().getUUID().equals(worldToRender.getUUID())) maps.add(map);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.getServerInterface().persistWorldChanges(mapToRender.getWorld().getUUID());
|
plugin.getServerInterface().persistWorldChanges(mapToRender.getWorld().getUUID());
|
||||||
maps.add(mapToRender);
|
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) {
|
for (BmMap map : maps) {
|
||||||
MapUpdateTask updateTask = new MapUpdateTask(map, center, radius);
|
MapUpdateTask updateTask = new MapUpdateTask(map, center, radius);
|
||||||
plugin.getRenderManager().scheduleRenderTask(updateTask);
|
plugin.getRenderManager().scheduleRenderTask(updateTask);
|
||||||
|
Loading…
Reference in New Issue
Block a user