mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-03 17:29:57 +01: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;
|
plugin = newPlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation") // since 1.13
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onInventoryClickEvent(InventoryClickEvent evt) {
|
public void onInventoryClickEvent(InventoryClickEvent evt) {
|
||||||
InventoryAction ac = evt.getAction();
|
InventoryAction ac = evt.getAction();
|
||||||
@ -114,7 +113,7 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
Quester quester = plugin.getQuester(evt.getWhoClicked().getUniqueId());
|
Quester quester = plugin.getQuester(evt.getWhoClicked().getUniqueId());
|
||||||
Player player = (Player) evt.getWhoClicked();
|
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();
|
ItemStack clicked = evt.getCurrentItem();
|
||||||
if (clicked != null) {
|
if (clicked != null) {
|
||||||
for (Quest quest : plugin.getQuests()) {
|
for (Quest quest : plugin.getQuests()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user