From 0a6af260a6ad90b683203052207ed5908bb5516d Mon Sep 17 00:00:00 2001 From: Mgazul Date: Fri, 26 Jan 2024 21:54:34 +0700 Subject: [PATCH] Remove forge world load event hook --- .../dispatcher/WorldEventDispatcher.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/main/java/com/mohistmc/eventhandler/dispatcher/WorldEventDispatcher.java b/src/main/java/com/mohistmc/eventhandler/dispatcher/WorldEventDispatcher.java index 8eed7e0ecb..20bfcf5d05 100644 --- a/src/main/java/com/mohistmc/eventhandler/dispatcher/WorldEventDispatcher.java +++ b/src/main/java/com/mohistmc/eventhandler/dispatcher/WorldEventDispatcher.java @@ -23,24 +23,10 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; -import org.bukkit.craftbukkit.v1_16_R3.CraftWorld; -import org.bukkit.event.world.WorldInitEvent; -import org.bukkit.event.world.WorldLoadEvent; import org.bukkit.event.world.WorldSaveEvent; public class WorldEventDispatcher { - //For WorldLoadEvent - @SubscribeEvent(receiveCanceled = true) - public void onWorldLoadEvent(WorldEvent.Load event) { - if (event.getWorld() instanceof ServerWorld) { - ServerWorld handle = (ServerWorld) event.getWorld(); - CraftWorld craftWorld = handle.getWorld(); - Bukkit.getPluginManager().callEvent(new WorldLoadEvent(craftWorld)); - Bukkit.getPluginManager().callEvent(new WorldInitEvent(craftWorld)); - } - } - //For WorldSaveEvent @SubscribeEvent(receiveCanceled = true) public void onWorldSaveEvent(WorldEvent.Save event) {