parent
012f82b805
commit
7ae1f2c1e6
5 changed files with 189 additions and 6 deletions
@ -0,0 +1,60 @@ |
||||
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 FarmEventHandler implements CommandExecutor { |
||||
|
||||
GroupArray m_GroupArray; |
||||
UserInfoArray m_UserInfoArray; |
||||
|
||||
public FarmEventHandler(GroupArray GA, UserInfoArray UIA){ |
||||
m_GroupArray = GA; |
||||
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_GroupArray.CreateGroup(tempUUID, args[1], p.getUniqueId()); |
||||
m_UserInfoArray.setUserGroupUUID("Party",p.getUniqueId(), tempUUID); |
||||
p.sendMessage(args[1]+"농장이 생성되었습니다."); |
||||
p.sendMessage("농장 멤버 목록: "); |
||||
for (String Name: m_GroupArray.GetGroupMembersName(tempUUID)){ |
||||
p.sendMessage(Name); |
||||
} |
||||
p.sendMessage("농장 목록:"); |
||||
for (String Name: m_GroupArray.GetGroupNameList()){ |
||||
p.sendMessage(Name); |
||||
} |
||||
break; |
||||
} |
||||
case "가입":{ |
||||
p.sendMessage("가입 테스트"); |
||||
break; |
||||
} |
||||
case "초대":{ |
||||
p.sendMessage("초대 테스트"); |
||||
break; |
||||
} |
||||
case "강퇴":{ |
||||
p.sendMessage("강퇴 테스트"); |
||||
break; |
||||
} |
||||
case "이름":{ |
||||
p.sendMessage("현재 파티 이름"+m_GroupArray.GetGroupName(m_UserInfoArray.getUserGroupUUID(p.getUniqueId(),"Party"))); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
return true; |
||||
} |
||||
} |
@ -0,0 +1,60 @@ |
||||
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 NationEventHandler implements CommandExecutor { |
||||
|
||||
GroupArray m_GroupArray; |
||||
UserInfoArray m_UserInfoArray; |
||||
|
||||
public NationEventHandler(GroupArray GA, UserInfoArray UIA){ |
||||
m_GroupArray = GA; |
||||
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_GroupArray.CreateGroup(tempUUID, args[1], p.getUniqueId()); |
||||
m_UserInfoArray.setUserGroupUUID("Party",p.getUniqueId(), tempUUID); |
||||
p.sendMessage(args[1]+"파티가 생성되었습니다."); |
||||
p.sendMessage("멤버 목록: "); |
||||
for (String Name: m_GroupArray.GetGroupMembersName(tempUUID)){ |
||||
p.sendMessage(Name); |
||||
} |
||||
p.sendMessage("파티 목록:"); |
||||
for (String Name: m_GroupArray.GetGroupNameList()){ |
||||
p.sendMessage(Name); |
||||
} |
||||
break; |
||||
} |
||||
case "가입":{ |
||||
p.sendMessage("가입 테스트"); |
||||
break; |
||||
} |
||||
case "초대":{ |
||||
p.sendMessage("초대 테스트"); |
||||
break; |
||||
} |
||||
case "강퇴":{ |
||||
p.sendMessage("강퇴 테스트"); |
||||
break; |
||||
} |
||||
case "이름":{ |
||||
p.sendMessage("현재 파티 이름"+m_GroupArray.GetGroupName(m_UserInfoArray.getUserGroupUUID(p.getUniqueId(),"Party"))); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
return true; |
||||
} |
||||
} |
@ -0,0 +1,60 @@ |
||||
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 SquadEventHandler implements CommandExecutor { |
||||
|
||||
GroupArray m_GroupArray; |
||||
UserInfoArray m_UserInfoArray; |
||||
|
||||
public SquadEventHandler(GroupArray GA, UserInfoArray UIA){ |
||||
m_GroupArray = GA; |
||||
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_GroupArray.CreateGroup(tempUUID, args[1], p.getUniqueId()); |
||||
m_UserInfoArray.setUserGroupUUID("Party",p.getUniqueId(), tempUUID); |
||||
p.sendMessage(args[1]+"파티가 생성되었습니다."); |
||||
p.sendMessage("멤버 목록: "); |
||||
for (String Name: m_GroupArray.GetGroupMembersName(tempUUID)){ |
||||
p.sendMessage(Name); |
||||
} |
||||
p.sendMessage("파티 목록:"); |
||||
for (String Name: m_GroupArray.GetGroupNameList()){ |
||||
p.sendMessage(Name); |
||||
} |
||||
break; |
||||
} |
||||
case "가입":{ |
||||
p.sendMessage("가입 테스트"); |
||||
break; |
||||
} |
||||
case "초대":{ |
||||
p.sendMessage("초대 테스트"); |
||||
break; |
||||
} |
||||
case "강퇴":{ |
||||
p.sendMessage("강퇴 테스트"); |
||||
break; |
||||
} |
||||
case "이름":{ |
||||
p.sendMessage("현재 파티 이름"+m_GroupArray.GetGroupName(m_UserInfoArray.getUserGroupUUID(p.getUniqueId(),"Party"))); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
return true; |
||||
} |
||||
} |
Loading…
Reference in new issue