Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Steanky committed Jun 26, 2023
1 parent b54c905 commit 813ba8a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.phantazm.core.game.scene;

import net.minestom.server.event.EventDispatcher;
import net.minestom.server.MinecraftServer;
import net.minestom.server.ServerProcess;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.UnmodifiableView;
import org.phantazm.core.game.scene.event.SceneShutdownEvent;
Expand Down Expand Up @@ -64,7 +65,10 @@ public void tick(long time) {
cleanupScene(scene);
iterator.remove();

EventDispatcher.call(new SceneShutdownEvent(scene));
ServerProcess process = MinecraftServer.process();
if (process != null) {
process.eventHandler().call(new SceneShutdownEvent(scene));
}
}
else {
scene.tick(time);
Expand Down

0 comments on commit 813ba8a

Please sign in to comment.