mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-27 20:57:35 +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)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onPlayerJoin(final PlayerJoinEvent event) {
|
public void onPlayerJoin(final PlayerJoinEvent event) {
|
||||||
if (event.getPlayer() == null) {
|
if (event.getPlayer() == null)
|
||||||
return;
|
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
|
// Shedule login task so works after the prelogin
|
||||||
@ -211,16 +219,7 @@ public class AuthMePlayerListener implements Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Player player = event.getPlayer();
|
|
||||||
String name = player.getName().toLowerCase();
|
|
||||||
|
|
||||||
plugin.management.performJoin(player);
|
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