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)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onPlayerLogin(final PlayerLoginEvent event)
|
public void onPlayerLogin(final PlayerLoginEvent event)
|
||||||
{
|
{
|
||||||
if (event.getResult() != Result.ALLOWED && event.getResult() != Result.KICK_FULL && event.getResult() != Result.KICK_BANNED)
|
switch (event.getResult()) {
|
||||||
{
|
case ALLOWED:
|
||||||
return;
|
case KICK_FULL:
|
||||||
|
case KICK_BANNED:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
User user = ess.getUser(event.getPlayer());
|
User user = ess.getUser(event.getPlayer());
|
||||||
user.setNPC(false);
|
user.setNPC(false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user