Fix the bug for display disappear (maybe)

Former-commit-id: f52cf97f152ee1c45bab2966312c1d15c82eda21
This commit is contained in:
Ghost_chu committed 2020-02-07 22:48:22 +08:00
1 parent 28b7289922
commit 6cf975199f
2 files changed
+3 -2

No files matched your search

@@ -21,6 +21,7 @@ package org.maxgamer.quickshop.Listeners;
import java.util.HashMap;
import lombok.AllArgsConstructor;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@@ -48,7 +49,7 @@ public class ChunkListener implements Listener {
return;
}
//noinspection unchecked
((HashMap<Location, Shop>) inChunk.clone()).values().forEach(Shop::onLoad);
Bukkit.getScheduler().runTaskLater(plugin,()-> ((HashMap<Location, Shop>) inChunk.clone()).values().forEach(Shop::onLoad),1);
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)