mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 22:16:22 +00:00
Simplify packet queuing
This commit is contained in:
8 files changed
+32
-75
No files matched your search
@@ -75,9 +75,7 @@ public class PaperPlayerJoinListener implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onJoinEarly(final PlayerJoinEvent event) {
|
||||
this.messaging.get().withPacketService(packetService -> {
|
||||
packetService.queuePacket(this.packetFactory.addLocalPlayerPacket(event.getPlayer().getUniqueId(), event.getPlayer().getName()));
|
||||
});
|
||||
this.messaging.get().queuePacket(() -> this.packetFactory.addLocalPlayerPacket(event.getPlayer().getUniqueId(), event.getPlayer().getName()));
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
|
||||
Reference in new issue
Block a user