mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 03:05:17 +01:00
move set join message outside task.
This commit is contained in:
parent
f90104ca2d
commit
6cc0cd62f5
@ -201,8 +201,16 @@ public class AuthMePlayerListener implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onPlayerJoin(final PlayerJoinEvent event) {
|
||||
if (event.getPlayer() == null) {
|
||||
if (event.getPlayer() == null)
|
||||
return;
|
||||
|
||||
final Player player = event.getPlayer();
|
||||
String name = player.getName().toLowerCase();
|
||||
|
||||
// Remove the join message while the player isn't logging in
|
||||
if (Settings.delayJoinLeaveMessages && event.getJoinMessage() != null) {
|
||||
joinMessage.put(name, event.getJoinMessage());
|
||||
event.setJoinMessage(null);
|
||||
}
|
||||
|
||||
// Shedule login task so works after the prelogin
|
||||
@ -211,16 +219,7 @@ public class AuthMePlayerListener implements Listener {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Player player = event.getPlayer();
|
||||
String name = player.getName().toLowerCase();
|
||||
|
||||
plugin.management.performJoin(player);
|
||||
|
||||
// Remove the join message while the player isn't logging in
|
||||
if (Settings.delayJoinLeaveMessages && event.getJoinMessage() != null) {
|
||||
joinMessage.put(name, event.getJoinMessage());
|
||||
event.setJoinMessage(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user