diff --git a/pom.xml b/pom.xml index 471f420fa..362c831ae 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 org.maxgamer QuickShop - Reremake 2.0.7 + Reremake 2.1.0-SNAPSHOT diff --git a/src/main/java/org/maxgamer/quickshop/Listeners/ChunkListener.java b/src/main/java/org/maxgamer/quickshop/Listeners/ChunkListener.java index a9fe9f23c..6f94ce175 100644 --- a/src/main/java/org/maxgamer/quickshop/Listeners/ChunkListener.java +++ b/src/main/java/org/maxgamer/quickshop/Listeners/ChunkListener.java @@ -10,6 +10,7 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.world.ChunkLoadEvent; import org.bukkit.event.world.ChunkUnloadEvent; +import org.bukkit.scheduler.BukkitRunnable; import org.maxgamer.quickshop.QuickShop; import org.maxgamer.quickshop.Shop.Shop; @@ -25,16 +26,14 @@ public class ChunkListener implements Listener { HashMap inChunk = plugin.getShopManager().getShops(c); if (inChunk == null || inChunk.isEmpty()) return; - // new BukkitRunnable() { - // - // @Override - // public void run() { - for (Shop shop : inChunk.values()) { - shop.onLoad(); - } - // - // } - // }.runTaskLater(plugin, 1); //Delay 1 tick, hope can fix the magic bug in 1.14 spigot build. + new BukkitRunnable() { + @Override + public void run() { + for (Shop shop : inChunk.values()) { + shop.onLoad(); + } + } + }.runTaskLater(plugin, 1); //Delay 1 tick, hope can fix the magic bug in 1.14 spigot build. } @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) @@ -43,13 +42,13 @@ public class ChunkListener implements Listener { HashMap inChunk = plugin.getShopManager().getShops(c); if (inChunk == null || inChunk.isEmpty()) return; - // new BukkitRunnable() { - // @Override - // public void run() { - for (Shop shop : inChunk.values()) { - shop.onUnload(); - } - // } - // }.runTaskLater(plugin, 1); //Delay 1 tick, hope can fix the magic bug in 1.14 spigot build. + new BukkitRunnable() { + @Override + public void run() { + for (Shop shop : inChunk.values()) { + shop.onUnload(); + } + } + }.runTaskLater(plugin, 1); //Delay 1 tick, hope can fix the magic bug in 1.14 spigot build. } } \ No newline at end of file