mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-22 10:22:29 +00:00
Fixed NPE while removing a shop when vendor is not online
+ Added missing javadoc parameter 'message' Fixes #91
This commit is contained in:
parent
0a67cd81a2
commit
71e2c48cc2
@ -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() + ")");
|
||||
|
Loading…
Reference in New Issue
Block a user