mirror of
https://github.com/BlazingGames/blazing-games-plugin.git
synced 2025-02-03 21:26:41 -05:00
fix lodestone causing item loss
this is because there was techncially no current item if you were using number keys to get items into the gui, and that would cause item loss since you cant get the items back out
This commit is contained in:
parent
c2fd434df4
commit
2da808277e
1 changed files with 2 additions and 1 deletions
|
@ -35,8 +35,9 @@ public class LodestoneInventoryClickEventListener implements Listener {
|
|||
|
||||
@EventHandler
|
||||
public void onLodestoneClick(InventoryClickEvent event) {
|
||||
if (event.getView().title().equals(Component.text("Teleportation Menu").color(NamedTextColor.AQUA)) && event.getCurrentItem() != null) {
|
||||
if (event.getView().title().equals(Component.text("Teleportation Menu").color(NamedTextColor.AQUA))) {
|
||||
event.setCancelled(true);
|
||||
if (event.getCurrentItem() == null) return;
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
ItemMeta meta = event.getCurrentItem().getItemMeta();
|
||||
|
||||
|
|
Loading…
Reference in a new issue