File tree Expand file tree Collapse file tree
hostprofiles-common/src/main/java/de/mcmdev/hostprofiles/common/connection
hostprofiles-paper/src/main/java/de/mcmdev/hostprofiles/paper/listener Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ public boolean handleLogin(ConnectionEvent connectionEvent) {
2323 connectionEvent .setUuid (profile .getUuid ());
2424 connectionEvent .setName (profile .getName ());
2525 connectionEvent .setSkinCopy (profile .isSkinCopy ());
26- if (connectionEvent .getSkinValue () != null ) {
26+ if (profile .getSkinValue () != null ) {
2727 connectionEvent .setSkinValue (profile .getSkinValue ());
28- if (connectionEvent .getSkinSignature () != null ) {
28+ if (profile .getSkinSignature () != null ) {
2929 connectionEvent .setSkinSignature (profile .getSkinSignature ());
3030 }
3131 }
Original file line number Diff line number Diff line change 1414import org .bukkit .event .Listener ;
1515import org .bukkit .event .player .AsyncPlayerPreLoginEvent ;
1616
17+ import java .net .InetSocketAddress ;
18+
1719@ RequiredArgsConstructor
1820public class PaperListener implements Listener {
1921
@@ -54,7 +56,9 @@ private void onAsyncLogin(AsyncPlayerPreLoginEvent event) {
5456
5557 @ EventHandler
5658 public void onPing (PaperServerListPingEvent event ) {
57- String hostname = event .getClient ().getVirtualHost ().getHostName ();
59+ InetSocketAddress virtualHost = event .getClient ().getVirtualHost ();
60+ if (virtualHost == null ) return ;
61+ String hostname = virtualHost .getHostName ();
5862 PingEvent pingEvent = new PingEvent (hostname );
5963 connectionHandler .handlePing (pingEvent );
6064 if (pingEvent .getMotd () != null ) {
You can’t perform that action at this time.
0 commit comments