From 71e2c48cc2dcda79a7f9d8e4d2adb2d894451258 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 29 Mar 2017 20:05:56 +0200 Subject: [PATCH] Fixed NPE while removing a shop when vendor is not online + Added missing javadoc parameter 'message' Fixes #91 --- .../de/epiceric/shopchest/listeners/ShopInteractListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/epiceric/shopchest/listeners/ShopInteractListener.java b/src/main/java/de/epiceric/shopchest/listeners/ShopInteractListener.java index 33f8d37..59e88b8 100644 --- a/src/main/java/de/epiceric/shopchest/listeners/ShopInteractListener.java +++ b/src/main/java/de/epiceric/shopchest/listeners/ShopInteractListener.java @@ -526,7 +526,7 @@ public class ShopInteractListener implements Listener { * @param shop Shop to be removed */ private void remove(Player executor, Shop shop) { - plugin.debug(executor.getName() + " is removing " + shop.getVendor().getPlayer().getName() + "'s shop (#" + shop.getID() + ")"); + plugin.debug(executor.getName() + " is removing " + shop.getVendor().getName() + "'s shop (#" + shop.getID() + ")"); ShopRemoveEvent event = new ShopRemoveEvent(executor, shop); Bukkit.getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -543,6 +543,7 @@ public class ShopInteractListener implements Listener { * Open a shop * @param executor Player, who executed the command and will receive the message * @param shop Shop to be opened + * @param message Whether the player should receive the {@link LocalizedMessage.Message#OPENED_SHOP} message */ private void open(Player executor, Shop shop, boolean message) { plugin.debug(executor.getName() + " is opening " + shop.getVendor().getName() + "'s shop (#" + shop.getID() + ")");