Remove patch

Former-commit-id: c229c82b2a7315d276ae48704718c04189e6fe43
This commit is contained in:
Ghost_chu committed 2020-02-05 16:43:21 +08:00
1 parent 645388e9aa
commit 2c4e11441a
1 file changed
+4 -19
@@ -27,7 +27,6 @@ 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.jetbrains.annotations.NotNull;
import org.maxgamer.quickshop.QuickShop;
import org.maxgamer.quickshop.Shop.Shop;
@@ -39,7 +38,6 @@ public class ChunkListener implements Listener {
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onChunkLoad(ChunkLoadEvent e) {
if (e.isNewChunk()) {
return;
}
@@ -49,15 +47,8 @@ public class ChunkListener implements Listener {
if (inChunk == null || inChunk.isEmpty()) {
return;
}
new BukkitRunnable() {
@Override
public void run() {
//noinspection unchecked
((HashMap<Location, Shop>) inChunk.clone()).values().forEach(Shop::onLoad);
// Delay 1 tick, hope can fix the magic bug in 1.14 spigot build.
}
}.runTaskLater(plugin, 1);
//noinspection unchecked
((HashMap<Location, Shop>) inChunk.clone()).values().forEach(Shop::onLoad);
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
@@ -68,13 +59,7 @@ public class ChunkListener implements Listener {
if (inChunk == null || inChunk.isEmpty()) {
return;
}
new BukkitRunnable() {
@Override
public void run() {
//noinspection unchecked
((HashMap<Location, Shop>) inChunk.clone()).values().forEach(Shop::onUnload);
}
}.runTaskLater(plugin, 1); // Delay 1 tick, hope can fix the magic bug in 1.14 spigot build.
//noinspection unchecked
((HashMap<Location, Shop>) inChunk.clone()).values().forEach(Shop::onUnload);
}
}