Skip to content

Commit

Permalink
Potential fix for island top not sorted out correctly (#1669)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Apr 6, 2023
1 parent 8c97cb3 commit 3b5ad97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ public void reloadPlugin(boolean loadGrid) throws ManagerLoadException {
if (loadGrid) {
dataHandler.loadData();
stackedBlocksHandler.loadData();
SortingType.values().forEach(gridHandler::forceSortIslands);
modulesHandler.loadModulesData(this);
modulesHandler.enableModules(ModuleLoadTime.AFTER_MODULE_DATA_LOAD);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.bgsoftware.superiorskyblock.api.hooks.listener.ISkinsListener;
import com.bgsoftware.superiorskyblock.api.hooks.listener.IStackedBlocksListener;
import com.bgsoftware.superiorskyblock.api.hooks.listener.IWorldsListener;
import com.bgsoftware.superiorskyblock.api.island.SortingType;
import com.bgsoftware.superiorskyblock.api.key.Key;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
import com.bgsoftware.superiorskyblock.core.ChunkPosition;
Expand Down Expand Up @@ -219,6 +220,8 @@ public void forcePricesLoad() {
if (this.pricesLoadCallbacks != null) {
this.pricesLoadCallbacks.forEach(Runnable::run);
this.pricesLoadCallbacks = null;
// After we loaded all the price callbacks, we want to sort the top islands.
SortingType.values().forEach(plugin.getGrid()::forceSortIslands);
}
}

Expand Down

0 comments on commit 3b5ad97

Please sign in to comment.