mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-04 23:37:49 +01:00
Return missing method to remove shop gui viewer
This commit is contained in:
parent
b98c0b87d6
commit
9c62c2605d
@ -69,7 +69,7 @@ public class NameTranslatorManager {
|
|||||||
for (NameList one : ListOfEntities) {
|
for (NameList one : ListOfEntities) {
|
||||||
String ids = one.getId();
|
String ids = one.getId();
|
||||||
if (ids.equalsIgnoreCase(String.valueOf(info.getId())) && !one.getId().equalsIgnoreCase("0")) {
|
if (ids.equalsIgnoreCase(String.valueOf(info.getId())) && !one.getId().equalsIgnoreCase("0")) {
|
||||||
return materialName = one.getName();
|
return one.getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -140,7 +140,8 @@ public class JobsListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onShopClick(InventoryClickEvent event) {
|
public void onShopGuiClick(InventoryClickEvent event) {
|
||||||
|
|
||||||
if (Jobs.getShopManager().GuiList.isEmpty())
|
if (Jobs.getShopManager().GuiList.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -160,14 +161,25 @@ public class JobsListener implements Listener {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
|
public void onShopGuiClose(InventoryCloseEvent event) {
|
||||||
|
if (Jobs.getShopManager().GuiList.isEmpty())
|
||||||
|
return;
|
||||||
|
Player player = (Player) event.getPlayer();
|
||||||
|
if (Jobs.getShopManager().GuiList.containsKey(player.getName())) {
|
||||||
|
Jobs.getShopManager().GuiList.remove(player.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onGuiClose(InventoryCloseEvent event) {
|
public void onGuiClose(InventoryCloseEvent event) {
|
||||||
if (Jobs.getGUIManager().GuiList.isEmpty())
|
if (Jobs.getGUIManager().GuiList.isEmpty())
|
||||||
return;
|
return;
|
||||||
Player player = (Player) event.getPlayer();
|
Player player = (Player) event.getPlayer();
|
||||||
if (Jobs.getGUIManager().GuiList.containsKey(player.getName()))
|
if (Jobs.getGUIManager().GuiList.containsKey(player.getName())) {
|
||||||
Jobs.getGUIManager().GuiList.remove(player.getName());
|
Jobs.getGUIManager().GuiList.remove(player.getName());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onGuiLeftClick(InventoryClickEvent event) {
|
public void onGuiLeftClick(InventoryClickEvent event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user