mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-14 04:02:01 +01:00
Send arm swing after tablist
This commit is contained in:
parent
e7e2efd518
commit
d94cd006ec
@ -38,21 +38,17 @@ public class PlayerlistTracker extends ChunkMap.TrackedEntity {
|
|||||||
if (entityplayer == null)
|
if (entityplayer == null)
|
||||||
return;
|
return;
|
||||||
boolean sendTabRemove = NMS.sendTabListAdd(entityplayer.getBukkitEntity(), (Player) tracker.getBukkitEntity());
|
boolean sendTabRemove = NMS.sendTabListAdd(entityplayer.getBukkitEntity(), (Player) tracker.getBukkitEntity());
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(CitizensAPI.getPlugin(), new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
NMSImpl.sendPacket(entityplayer.getBukkitEntity(), new ClientboundAnimatePacket(tracker, 0));
|
|
||||||
}
|
|
||||||
}, 1);
|
|
||||||
|
|
||||||
if (!sendTabRemove || !Setting.DISABLE_TABLIST.asBoolean())
|
if (!sendTabRemove || !Setting.DISABLE_TABLIST.asBoolean()) {
|
||||||
|
Bukkit.getScheduler().scheduleSyncDelayedTask(CitizensAPI.getPlugin(),
|
||||||
|
() -> NMSImpl.sendPacket(entityplayer.getBukkitEntity(), new ClientboundAnimatePacket(tracker, 0)),
|
||||||
|
1);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(CitizensAPI.getPlugin(), new Runnable() {
|
Bukkit.getScheduler().scheduleSyncDelayedTask(CitizensAPI.getPlugin(), () -> {
|
||||||
@Override
|
NMS.sendTabListRemove(entityplayer.getBukkitEntity(), (Player) tracker.getBukkitEntity());
|
||||||
public void run() {
|
NMSImpl.sendPacket(entityplayer.getBukkitEntity(), new ClientboundAnimatePacket(tracker, 0));
|
||||||
NMS.sendTabListRemove(entityplayer.getBukkitEntity(), (Player) tracker.getBukkitEntity());
|
|
||||||
}
|
|
||||||
}, Setting.TABLIST_REMOVE_PACKET_DELAY.asInt());
|
}, Setting.TABLIST_REMOVE_PACKET_DELAY.asInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user