Paul19988 / Advanced-Slime-World-Manager

A Spigot plugin that implements the Slime Region Format.
GNU General Public License v3.0
183 stars 71 forks source link

fix: unload command not working (#127) #132

Closed ianlibanio closed 2 years ago

ianlibanio commented 2 years ago

When running the unload command without someone on the island, the command wouldn't work.

This PR fix this issue.

ComputerNerd100 commented 2 years ago

@ianlibanio I think I can see that you intended this to go into your fork, not into upstream, but just wanted to let you know that I noticed in your code you're calling Bukkit.unloadWorld in your completableFuture.thenRun block without wrapping in Bukkit.getScheduler.runTask - this will result in modifying the worlds off the main thread. The Bukkit API is not thread-safe, and this may result in unexpected behaviour. Hope this helps :)

ianlibanio commented 2 years ago

@ComputerNerd100 hi, so the PR is for here, but noticed those mistakes, so I'll create it again fixing this.