You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.8 KiB
50 lines
1.8 KiB
package org.poopki.duckdns.user_db.GUI; |
|
|
|
import org.bukkit.command.Command; |
|
import org.bukkit.command.CommandExecutor; |
|
import org.bukkit.command.CommandSender; |
|
import org.bukkit.entity.Player; |
|
import org.bukkit.event.EventHandler; |
|
import org.bukkit.event.Listener; |
|
import org.bukkit.event.inventory.InventoryClickEvent; |
|
import org.poopki.duckdns.user_db.Array.AccountArray; |
|
import org.poopki.duckdns.user_db.Array.FarmArray; |
|
import org.poopki.duckdns.user_db.Array.NationArray; |
|
import org.poopki.duckdns.user_db.Array.SquadArray; |
|
import org.poopki.duckdns.user_db.UserInfoArray; |
|
|
|
public class OpenInv implements Listener,CommandExecutor { |
|
AccountArray m_AccountArray; |
|
UserInfoArray m_UserInfoArray; |
|
FarmArray m_FarmArray; |
|
NationArray m_NationArray; |
|
SquadArray m_SquadArray; |
|
public OpenInv(UserInfoArray m_UIA, FarmArray FA, NationArray NA, SquadArray SA, AccountArray AA){ |
|
m_UserInfoArray = m_UIA; |
|
m_AccountArray = AA; |
|
m_FarmArray = FA; |
|
m_NationArray = NA; |
|
m_SquadArray = SA; |
|
} |
|
@Override |
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { |
|
if(sender instanceof Player){ |
|
Player player = (Player) sender; |
|
player.sendMessage("이벤트 발생"); |
|
BaseGUI inv = new BaseGUI(m_AccountArray,m_UserInfoArray,m_FarmArray,m_NationArray, m_SquadArray,((Player) sender).getUniqueId(), null); |
|
inv.open(player); |
|
} |
|
return false; |
|
} |
|
@EventHandler |
|
public void inven2(InventoryClickEvent e){ |
|
Player player = (Player) e.getWhoClicked();; |
|
player.sendMessage("이벤트 발생"); |
|
BaseGUI inv = new BaseGUI(m_AccountArray,m_UserInfoArray,m_FarmArray,m_NationArray, m_SquadArray, player.getUniqueId(), e); |
|
inv.inven(e); |
|
|
|
} |
|
|
|
|
|
|
|
}
|
|
|