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.
58 lines
2.1 KiB
58 lines
2.1 KiB
1 year ago
|
package org.poopki.duckdns.user_db.Bank;
|
||
2 years ago
|
|
||
|
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 AccountGUIEvent implements Listener,CommandExecutor {
|
||
|
AccountArray m_AccountArray;
|
||
|
UserInfoArray m_UserInfoArray;
|
||
|
FarmArray m_FarmArray;
|
||
|
NationArray m_NationArray;
|
||
|
SquadArray m_SquadArray;
|
||
|
public AccountGUIEvent(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("이벤트 발생");
|
||
|
AccountGUI inv = new AccountGUI(m_AccountArray,m_UserInfoArray,m_FarmArray,m_NationArray, m_SquadArray,((Player) sender).getUniqueId(), null);
|
||
|
inv.open(player);
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
@EventHandler
|
||
1 year ago
|
public boolean inven_Bank(InventoryClickEvent e){
|
||
2 years ago
|
Player player = (Player) e.getWhoClicked();;
|
||
1 year ago
|
String name = e.getView().getTitle();
|
||
|
player.sendMessage("이벤트 발생B");
|
||
|
if(name.equals(":offset_-8::bank_main:")){
|
||
|
if(e.getCurrentItem()!=null){
|
||
|
e.setCancelled(true);
|
||
|
AccountGUI inv = new AccountGUI(m_AccountArray,m_UserInfoArray,m_FarmArray,m_NationArray, m_SquadArray, player.getUniqueId(), e);
|
||
|
inv.inven(e);
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
2 years ago
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|