misc: Some minor improvements
This commit is contained in:
parent
cc3803307e
commit
01b41e47ae
@ -25,8 +25,8 @@ public class AuthMeListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onLogin(LoginEvent event) {
|
||||
final Player player = event.getPlayer();
|
||||
PreSendLoginEvent preSendLoginEvent = new PreSendLoginEvent(player);
|
||||
if(preSendLoginEvent.callEvent()){
|
||||
|
||||
if (new PreSendLoginEvent(player).callEvent()) {
|
||||
plugin.sendMessageToProxy(player, MessageType.LOGIN, player.getName());
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,10 @@ public class MessageListener implements PluginMessageListener {
|
||||
|
||||
@Override
|
||||
public void onPluginMessageReceived(@NotNull String identifier, @NotNull Player player, @NotNull byte[] bytes) {
|
||||
if(identifier.equals("authmevelocity")){
|
||||
if (!identifier.equals("authmevelocity")) {
|
||||
return;
|
||||
}
|
||||
|
||||
ByteArrayDataInput input = ByteStreams.newDataInput(bytes);
|
||||
String subchannel = input.readUTF();
|
||||
if ("main".equals(subchannel)) {
|
||||
@ -24,4 +27,3 @@ public class MessageListener implements PluginMessageListener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user