forked from CreeperMC/creeperpit
Only send join message on player's first join
This commit is contained in:
parent
a4e9f9cd5a
commit
3cce2c711c
|
|
@ -58,7 +58,12 @@ public final class Main extends JavaPlugin implements Listener {
|
|||
public void onJoin(PlayerJoinEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
|
||||
event.setJoinMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "[+] " + ChatColor.RESET + ChatColor.YELLOW + player.getName());
|
||||
// event.setJoinMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "[+] " + ChatColor.RESET + ChatColor.YELLOW + player.getName());
|
||||
if (player.hasPlayedBefore()) {
|
||||
event.setJoinMessage(null);
|
||||
} else {
|
||||
event.setJoinMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "[+] " + ChatColor.RESET + ChatColor.YELLOW + player.getName());
|
||||
}
|
||||
|
||||
setupPlayer(player);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user