diff --git a/Array/Nation.java b/Array/Nation.java index ba3e16c..23a6d8c 100644 --- a/Array/Nation.java +++ b/Array/Nation.java @@ -38,7 +38,7 @@ public class Nation extends Group{ } } }.runTaskTimer(plugin,0,20); - InitResearchItem(); + //InitResearchItem(); } public void InitResearchItem(){ @@ -52,6 +52,7 @@ public class Nation extends Group{ public void AddShowResearchProgressBar(Integer index, Player player){ m_ResearchArray.get(index).tech1_progressbar.addPlayer(player); } + public void ShowResearchProgressBar(Integer index, boolean toggle){ m_ResearchArray.get(index).tech1_progressbar.setVisible(toggle); } diff --git a/DB/DBConnect.java b/DB/DBConnect.java index 6b0d9d5..2f1404a 100644 --- a/DB/DBConnect.java +++ b/DB/DBConnect.java @@ -5,7 +5,7 @@ import java.sql.*; public class DBConnect { private static final String DB_DRIVER_CLASS = "org.mariadb.jdbc.Driver"; - private static final String DB_URL = "jdbc:mariadb://192.168.0.4:3307/"; + private static final String DB_URL = "jdbc:mariadb://192.168.2.4:3307/"; private static final String DB_USERNAME = "mc_dev"; private static final String DB_PASSWORD = "!Rkdalsrn1027"; diff --git a/DB/DBUpdate.java b/DB/DBUpdate.java index 655aa2e..fb418fe 100644 --- a/DB/DBUpdate.java +++ b/DB/DBUpdate.java @@ -13,7 +13,7 @@ import java.util.UUID; public class DBUpdate { private final String DB_DRIVER_CLASS = "org.mariadb.jdbc.Driver"; - private final String DB_URL = "jdbc:mariadb://192.168.0.4:3307/mc_dev"; + private final String DB_URL = "jdbc:mariadb://192.168.2.4:3307/mc_dev"; private final String DB_USERNAME = "mc_dev"; private final String DB_PASSWORD = "!Rkdalsrn1027"; private UserInfoArray m_InfoArrayInstance; @@ -264,12 +264,9 @@ public class DBUpdate { pstmt.setString(5, String.valueOf(m_InfoArrayInstance.getUserGroupUUID(key, "Farm"))); pstmt.setString(6, String.valueOf(m_AccountArray.getAccountInfo(key))); int cnt = pstmt.executeUpdate(); - if( cnt == 0 ){ + if( cnt == 0 ) { System.out.println("[DB] 유저 데이터 입력 실패"); } - else{ - System.out.println("[DB] 유저 데이터 입력 성공"); - } } } @@ -333,9 +330,7 @@ public class DBUpdate { if( cnt == 0 ){ System.out.println("[DB] 국가 데이터 입력 실패"); } - else{ - System.out.println("[DB] 국가 데이터 입력 성공"); - } + } } @@ -397,9 +392,7 @@ public class DBUpdate { if( cnt == 0 ){ System.out.println("[DB] 분대 데이터 입력 실패"); } - else{ - System.out.println("[DB] 분대 데이터 입력 성공"); - } + } if( conn != null && !conn.isClosed()){ conn.close(); diff --git a/InfoGUI/ScoreboardEvent.java b/InfoGUI/ScoreboardEvent.java index 6d3ab64..14bc8b5 100644 --- a/InfoGUI/ScoreboardEvent.java +++ b/InfoGUI/ScoreboardEvent.java @@ -53,7 +53,7 @@ public class ScoreboardEvent { Score score4 = score_obj.getScore("농장 이름: " + m_FarmArray.GetGroupName(m_InfoArrayInstance.getUserGroupUUID(player.getUniqueId(), "Farm"))); score4.setScore(14); } -/* + if(ZERO_UUID.equals(m_InfoArrayInstance.getUserGroupUUID(player.getUniqueId(), "Nation"))) { Score score5 = score_obj.getScore("국가 이름: ----"); score5.setScore(13); @@ -71,7 +71,7 @@ public class ScoreboardEvent { Score score6 = score_obj.getScore("분대 이름: "+m_SquadArray.GetGroupName(m_InfoArrayInstance.getUserGroupUUID(player.getUniqueId(), "Squad"))); score6.setScore(12); } -*/ + player.setScoreboard(scoreboard); } } diff --git a/UserInfo.java b/UserInfo.java index 9930e9e..ba163b5 100644 --- a/UserInfo.java +++ b/UserInfo.java @@ -1,37 +1,28 @@ package org.poopki.duckdns.user_db; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; +import java.util.*; public class UserInfo extends Status { private UUID m_UUID; private String m_Name; - private static Map m_status = new HashMap(); - - private int m_Nation; - private int m_Squad; - private int m_Farm; - - public UserInfo(UUID uuid, String Name, int Nation, int Squad, int Farm){ //UserInfo 초기화 - super(100,100,1,10,10,10,10); + private Map m_GroupUUID = new HashMap(); + public UserInfo(UUID uuid, String Name, UUID Nation, UUID Squad, UUID Farm, UUID Party){ //UserInfo 초기화 + super(100,100,1,10,10,10,10); //HP, MP, LEV, STR, DEX, INT, LUK m_UUID = uuid; m_Name = Name; - m_Nation = Nation; - m_Squad = Squad; - m_Farm = Farm; - } - public void JoinNation(int Nation) { m_Nation = Nation; } - public void JoinSquad(int Squad) { m_Squad = Squad; } - public void JoinFarm(int Farm) { m_Farm = Farm; } + m_GroupUUID.put("Nation", Nation); + m_GroupUUID.put("Squad", Squad); + m_GroupUUID.put("Farm", Farm); + m_GroupUUID.put("Party", Party); + } + public void SetGroupUUID(String GroupType, UUID m_UUID){ m_GroupUUID.put(GroupType, m_UUID); } + public UUID GetGroupUUID(String GroupType){ return m_GroupUUID.get(GroupType); } public String getUserName(){ return m_Name; } - public UUID getUserUUID(){ return m_UUID; } - -} +} \ No newline at end of file diff --git a/User_DB.java b/User_DB.java index 16ed251..5e0a89f 100644 --- a/User_DB.java +++ b/User_DB.java @@ -41,6 +41,7 @@ public final class User_DB extends JavaPlugin implements Listener { } catch (SQLException e) { throw new RuntimeException(e); } + getCommand("계좌").setExecutor(new AccountEventHandler(m_InfoArrayInstance, m_AccountArrayInstance)); getCommand("농장").setExecutor(new FarmEventHandler(m_InfoArrayInstance, m_FarmArrayInstance, m_AccountArrayInstance)); getCommand("국가").setExecutor(new NationEventHandler(m_InfoArrayInstance, m_NationArrayInstance, m_AccountArrayInstance));