Clean up codes

Former-commit-id: 7906b8305bc4bd9b430d178099073b85b9e59ed0 [formerly 9b95598d96a0a21ae09f065a69dbaffeb0f72156]
Former-commit-id: 84028926b5e9ca5ee1ecdcb7fdca552f3e61fb15
This commit is contained in:
Ghost_chu committed 2019-05-25 20:26:11 +08:00
1 parent a70b2a23db
commit fadd16783e
2 files changed
+4 -5

No files matched your search

@@ -17,14 +17,14 @@ import org.maxgamer.quickshop.Shop.ShopChunk;
* Also deletes invalid items.
*/
public class ItemWatcher implements Runnable {
static QuickShop plugin = QuickShop.instance;
private QuickShop plugin;
public ItemWatcher(QuickShop plugin) {
ItemWatcher.plugin = plugin;
this.plugin = plugin;
}
public void run() {
List<Shop> toRemove = new ArrayList<Shop>(1);
List<Shop> toRemove = new ArrayList<>(1);
for (Entry<String, HashMap<ShopChunk, HashMap<Location, Shop>>> inWorld : plugin.getShopManager().getShops().entrySet()) {
// This world
World world = Bukkit.getWorld(inWorld.getKey());
@@ -39,7 +39,6 @@ public class ItemWatcher implements Runnable {
// Validate the shop.
if (!shop.isValid()) {
toRemove.add(shop);
continue;
}
}
}
@@ -61,7 +61,7 @@ public class UpdateWatcher implements Listener {
}
@EventHandler
public void PlayerJoin(PlayerJoinEvent e) {
public void playerJoin(PlayerJoinEvent e) {
new BukkitRunnable() {
@Override
public void run() {