diff --git a/src/main/java/com/alttd/playershops/shop/PlayerShop.java b/src/main/java/com/alttd/playershops/shop/PlayerShop.java index c1b9c98..932d0d2 100644 --- a/src/main/java/com/alttd/playershops/shop/PlayerShop.java +++ b/src/main/java/com/alttd/playershops/shop/PlayerShop.java @@ -280,6 +280,8 @@ public class PlayerShop { } public void setItemStack(ItemStack itemStack) { + if (this.itemStack.equals(itemStack)) + return; // no changes have been made. ShopItemChangeEvent shopItemChangeEvent = new ShopItemChangeEvent(this, itemStack); if (Util.callCancellableEvent(shopItemChangeEvent)) return; // cancelled by another plugin, does this need logging? @@ -290,6 +292,8 @@ public class PlayerShop { } public void setPrice(double price) { + if (this.price == price) + return; // no changes have been made. ShopPriceChangeEvent shopPriceChangeEvent = new ShopPriceChangeEvent(this, price); if (Util.callCancellableEvent(shopPriceChangeEvent)) return; // cancelled by another plugin, does this need logging? @@ -300,6 +304,8 @@ public class PlayerShop { } public void setAmount(int amount) { + if (this.amount == amount) + return; // no changes have been made. ShopItemAmountChangeEvent ShopItemAmountChangeEvent = new ShopItemAmountChangeEvent(this, amount); if (Util.callCancellableEvent(ShopItemAmountChangeEvent)) return; // cancelled by another plugin, does this need logging? @@ -310,6 +316,8 @@ public class PlayerShop { } public void setShopType(ShopType shopType) { + if (this.type == shopType) + return; // no changes have been made. ShopTypeChangeEvent shopTypeChangeEvent = new ShopTypeChangeEvent(this, shopType); if (Util.callCancellableEvent(shopTypeChangeEvent)) return; // cancelled by another plugin, does this need logging?