Fix minor bug

Group_System
poopki 3 years ago
parent fe9efa748b
commit 5f7c4b2904
  1. 8
      GroupArray.java
  2. 4
      PartyArray.java
  3. 4
      PartyEventHandler.java

@ -24,10 +24,10 @@ public class GroupArray {
} }
} }
public boolean DeleteGroup(UUID GroupUUID){ public boolean DeleteGroup(UUID GroupUUID, String GroupType){
if(m_GroupArray.containsKey(GroupUUID)){ if(m_GroupArray.containsKey(GroupUUID)){
for(UUID key: GetGroupMembersUUID(GroupUUID)){ for(UUID key: GetGroupMembersUUID(GroupUUID)){
m_UserInfoArray.setUserPartyUUID(key, new UUID(0,0)); m_UserInfoArray.setUserPartyUUID(GroupType,key,new UUID(0,0));
} }
m_GroupNameList.remove(GetGroupName(GroupUUID)); m_GroupNameList.remove(GetGroupName(GroupUUID));
@ -40,12 +40,12 @@ public class GroupArray {
} }
public Integer SignUpGroup(UUID GroupUUID, UUID PlayerUUID){ public Integer SignUpGroup(String GroupType, UUID GroupUUID, UUID PlayerUUID){
if(m_GroupArray.containsKey(GroupUUID)){ if(m_GroupArray.containsKey(GroupUUID)){
if(isOffline(PlayerUUID)){ if(isOffline(PlayerUUID)){
Group m_Group = m_GroupArray.get(GroupUUID); Group m_Group = m_GroupArray.get(GroupUUID);
m_Group.SignUp(PlayerUUID); m_Group.SignUp(PlayerUUID);
m_UserInfoArray.setUserPartyUUID(PlayerUUID,GroupUUID); m_UserInfoArray.setUserPartyUUID(GroupType,PlayerUUID,GroupUUID);
return 1; // Success return 1; // Success
}else{ }else{
return 2; // Offline Player return 2; // Offline Player

@ -27,7 +27,7 @@ public class PartyArray {
public boolean DeleteParty(UUID PartyUUID){ public boolean DeleteParty(UUID PartyUUID){
if(m_PartyArray.containsKey(PartyUUID)){ if(m_PartyArray.containsKey(PartyUUID)){
for(UUID key: GetPartyMembersUUID(PartyUUID)){ for(UUID key: GetPartyMembersUUID(PartyUUID)){
m_UserInfoArray.setUserPartyUUID(key, new UUID(0,0)); m_UserInfoArray.setUserPartyUUID("Party",key, new UUID(0,0));
} }
m_PartyNameList.remove(GetPartyName(PartyUUID)); m_PartyNameList.remove(GetPartyName(PartyUUID));
@ -45,7 +45,7 @@ public class PartyArray {
if(isOffline(PlayerUUID)){ if(isOffline(PlayerUUID)){
Party m_Party = m_PartyArray.get(PartyUUID); Party m_Party = m_PartyArray.get(PartyUUID);
m_Party.SignUp(PlayerUUID); m_Party.SignUp(PlayerUUID);
m_UserInfoArray.setUserPartyUUID(PlayerUUID,PartyUUID); m_UserInfoArray.setUserPartyUUID("Party",PlayerUUID,PartyUUID);
return 1; // Success return 1; // Success
}else{ }else{
return 2; // Offline Player return 2; // Offline Player

@ -25,7 +25,7 @@ public class PartyEventHandler implements CommandExecutor {
case "생성":{ case "생성":{
UUID tempUUID = UUID.randomUUID(); UUID tempUUID = UUID.randomUUID();
m_PartyArray.CreateParty(tempUUID, args[1], p.getUniqueId()); m_PartyArray.CreateParty(tempUUID, args[1], p.getUniqueId());
m_UserInfoArray.setUserPartyUUID(p.getUniqueId(), tempUUID); m_UserInfoArray.setUserPartyUUID("Party",p.getUniqueId(), tempUUID);
p.sendMessage(args[1]+"파티가 생성되었습니다."); p.sendMessage(args[1]+"파티가 생성되었습니다.");
p.sendMessage("멤버 목록: "); p.sendMessage("멤버 목록: ");
for (String Name: m_PartyArray.GetPartyMembersName(tempUUID)){ for (String Name: m_PartyArray.GetPartyMembersName(tempUUID)){
@ -49,7 +49,7 @@ public class PartyEventHandler implements CommandExecutor {
break; break;
} }
*/ case "이름":{ */ case "이름":{
p.sendMessage("현재 파티 이름"+m_PartyArray.GetPartyName(m_UserInfoArray.getUserPartyUUID(p.getUniqueId()))); p.sendMessage("현재 파티 이름"+m_PartyArray.GetPartyName(m_UserInfoArray.getUserPartyUUID(p.getUniqueId(),"Party")));
break; break;
} }
} }

Loading…
Cancel
Save