package org.poopki.duckdns.user_db; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import java.util.UUID; public class PartyEventHandler implements CommandExecutor { PartyArray m_PartyArray; UserInfoArray m_UserInfoArray; public PartyEventHandler(PartyArray PA, UserInfoArray UIA){ m_PartyArray = PA; m_UserInfoArray = UIA; } @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { Player p = (Player) sender; if (args.length != 0) { switch (args[0]) { case "생성":{ UUID tempUUID = UUID.randomUUID(); m_PartyArray.CreateParty(tempUUID, args[1], p.getUniqueId()); m_UserInfoArray.setUserPartyUUID(p.getUniqueId(), tempUUID); p.sendMessage(args[1]+"파티가 생성되었습니다."); p.sendMessage("멤버 목록: "); for (String Name: m_PartyArray.GetPartyMembers(tempUUID)){ p.sendMessage(Name); } p.sendMessage("파티 목록:"); for (String Name: m_PartyArray.GetPartyNameList()){ p.sendMessage(Name); } break; } /* case "가입":{ break; } case "초대":{ break; } case "강퇴":{ break; } */ case "이름":{ p.sendMessage("현재 파티 이름"+m_PartyArray.GetPartyName(m_UserInfoArray.getUserPartyUUID(p.getUniqueId()))); break; } } } return true; } }