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.
25 lines
945 B
25 lines
945 B
package org.poopki.duckdns.user_db; |
|
import org.bukkit.entity.Player; |
|
import org.bukkit.event.EventHandler; |
|
import org.bukkit.event.Listener; |
|
import org.bukkit.event.player.PlayerJoinEvent; |
|
import org.poopki.duckdns.user_db.Array.AccountArray; |
|
|
|
import java.util.UUID; |
|
|
|
public class UserJoin implements Listener { |
|
private UserInfoArray m_InfoArrayInstance; |
|
private AccountArray m_AccountArray; |
|
UserJoin(UserInfoArray UIA, AccountArray AA){ |
|
m_AccountArray = AA; |
|
m_InfoArrayInstance = UIA; |
|
} |
|
@EventHandler |
|
public void PlayerLogin(PlayerJoinEvent e) { |
|
Player p = e.getPlayer(); |
|
if(!m_InfoArrayInstance.checkNewUser(p.getUniqueId())){ //새로운 user인 경우 array에 등록 |
|
m_InfoArrayInstance.putUserInfo(p.getUniqueId(), p.getName(), new UUID(0,0), new UUID(0,0), new UUID(0,0), new UUID(0,0)); |
|
m_AccountArray.putAccountInfo(p.getUniqueId(), 0); |
|
} |
|
} |
|
}
|
|
|