Better channel register packet
This commit is contained in:
parent
cb433458f4
commit
08bee8afd8
@ -24,6 +24,10 @@ public class PacketListenerChannelRegister extends PacketAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPacketReceiving(PacketEvent event) {
|
public void onPacketReceiving(PacketEvent event) {
|
||||||
|
if (event.isPlayerTemporary()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (NmsVersion.v1_13.isSupported()) {
|
if (NmsVersion.v1_13.isSupported()) {
|
||||||
if (!event.getPacket().getMinecraftKeys().read(0).getFullKey().equals("minecraft:brand")) {
|
if (!event.getPacket().getMinecraftKeys().read(0).getFullKey().equals("minecraft:brand")) {
|
||||||
return;
|
return;
|
||||||
@ -34,12 +38,16 @@ public class PacketListenerChannelRegister extends PacketAdapter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
|
if (player == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Player player = event.getPlayer();
|
if (!player.isOnline() || player.hasMetadata("ld_loggedin")) {
|
||||||
|
|
||||||
if (player == null || player.hasMetadata("ld_loggedin")) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user