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.
22 lines
635 B
22 lines
635 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; |
|
|
|
public class UserJoin implements Listener { |
|
private UserInfoArray m_InfoArray; |
|
UserJoin(UserInfoArray m_UIA){ |
|
m_InfoArray = m_UIA; |
|
} |
|
@EventHandler |
|
public void PlayerLogin(PlayerJoinEvent e) { |
|
Player p = e.getPlayer(); |
|
if(m_InfoArray.m_UserInfoArray.containsKey(p.getUniqueId())){ |
|
m_InfoArray.getUserInfo(p); |
|
} |
|
else{ |
|
m_InfoArray.putUserInfo(p); |
|
} |
|
} |
|
} |