mirror of
https://github.com/PikaMug/Quests.git
synced 2024-09-09 14:08:02 +02:00
Get inventory title from view
This commit is contained in:
parent
3495434d9d
commit
a2ba535731
@ -86,7 +86,6 @@ public class PlayerListener implements Listener {
|
||||
plugin = newPlugin;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // since 1.13
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onInventoryClickEvent(InventoryClickEvent evt) {
|
||||
InventoryAction ac = evt.getAction();
|
||||
@ -114,7 +113,7 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
Quester quester = plugin.getQuester(evt.getWhoClicked().getUniqueId());
|
||||
Player player = (Player) evt.getWhoClicked();
|
||||
if (evt.getInventory().getTitle().contains(Lang.get(player, "quests"))) {
|
||||
if (evt.getView().getTitle().contains(Lang.get(player, "quests"))) {
|
||||
ItemStack clicked = evt.getCurrentItem();
|
||||
if (clicked != null) {
|
||||
for (Quest quest : plugin.getQuests()) {
|
||||
|
Loading…
Reference in New Issue
Block a user