mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 16:45:37 +01:00
I think switches are better.
This commit is contained in:
parent
de7ab13c03
commit
b6bbe237ea
@ -182,10 +182,15 @@ public class EssentialsPlayerListener implements Listener
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onPlayerLogin(final PlayerLoginEvent event)
|
||||
{
|
||||
if (event.getResult() != Result.ALLOWED && event.getResult() != Result.KICK_FULL && event.getResult() != Result.KICK_BANNED)
|
||||
{
|
||||
return;
|
||||
switch (event.getResult()) {
|
||||
case ALLOWED:
|
||||
case KICK_FULL:
|
||||
case KICK_BANNED:
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
User user = ess.getUser(event.getPlayer());
|
||||
user.setNPC(false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user