From e96c811cd1c0177bc3ec6890a169fb0fb80233a3 Mon Sep 17 00:00:00 2001
From: Ghost_chu <2908803755@qq.com>
Date: Tue, 18 Jun 2019 17:52:29 +0800
Subject: [PATCH] 2.1.0 SNAPSHOT on!
Former-commit-id: 6f0f3228b288b9daf31712b1facce252839a4704 [formerly 2b31d3d7df9e108d249b434af7b4987b7ed4d41f]
Former-commit-id: 502136f2b39b0a1f714f4a45e2ad9b42d4d79f59
---
pom.xml | 2 +-
.../quickshop/Listeners/ChunkListener.java | 35 +++++++++----------
2 files changed, 18 insertions(+), 19 deletions(-)
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