Merge pull request #53 from BentoBoxWorld/fixes-onMove-crash

Fixes crash when NetherWorld is disabeled
This commit is contained in:
tastybento 2023-06-13 06:52:05 -07:00 committed by GitHub
commit 31020374ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,7 @@ public class AdvancementListener implements Listener {
*/
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onMove(PlayerMoveEvent e) {
if (!Util.sameWorld(e.getPlayer().getWorld(), addon.getNetherWorld())) {
if (!addon.getSettings().isNetherGenerate() || !Util.sameWorld(e.getPlayer().getWorld(), addon.getNetherWorld())) {
return;
}
// Nether fortress advancement