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.

66 lines
1.7 KiB

package org.poopki.duckdns.user_db.Array;
import org.bukkit.inventory.Inventory;
import org.poopki.duckdns.user_db.Research.Research;
import java.util.*;
public class Group {
public String m_Name;
public List<UUID> m_MemberList = new ArrayList<>();
public List<Research> m_ResearchArray = new ArrayList<Research>();
public Map<String, Integer> m_TechStat = new HashMap<String, Integer>();
UUID ZERO_UUID = UUID.fromString("00000000-0000-0000-0000-000000000000");
int MAX_FARM_NUM = 10;
Inventory research_tab;
public Group(String Name, List<UUID> uuid_list){
int index = 0;
for(UUID key: uuid_list){
m_MemberList.add(index,key);
index++;
}
m_Name = Name;
}
public void SignUp(UUID uuid){
m_MemberList.add((UUID)uuid);
}
public void Expulsion(UUID uuid){
m_MemberList.remove(uuid);
}
public boolean isMember(UUID uuid){
return m_MemberList.contains(uuid);
}
public int getMemMaxNUM(){
return MAX_FARM_NUM;
}
public List<UUID> getGroupMembers(){ return m_MemberList;}
public int getMemNUM(){
int num = m_MemberList.size();
return num;
}
public String getGroupName(){ return m_Name; }
public int isEmpty(){return m_MemberList.size();}
public boolean isOwner(UUID uuid){
if(m_MemberList.get(0).equals(uuid)){
return true;
}else{
return false;
}
}
public void InitTechTree(String A, Integer B){
m_TechStat.put(A,B);
}
public void SetTechTree(String TechName, Integer set){
m_TechStat.replace(TechName,set);
}
public int GetTechTree(String TechName){
return m_TechStat.get(TechName);
}
}