2.1.0 SNAPSHOT on!

Former-commit-id: 6f0f3228b288b9daf31712b1facce252839a4704 [formerly 2b31d3d7df9e108d249b434af7b4987b7ed4d41f]
Former-commit-id: 502136f2b39b0a1f714f4a45e2ad9b42d4d79f59
This commit is contained in:
Ghost_chu committed 2019-06-18 17:52:29 +08:00
1 parent 964be09801
commit e96c811cd1
2 files changed
+18 -19

No files matched your search

@@ -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<Location, Shop> 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<Location, Shop> 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.
}
}