File tree Expand file tree Collapse file tree
api/src/main/java/me/tofaa/entitylib/wrapper Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import com .github .retrooper .packetevents .protocol .player .GameMode ;
66import com .github .retrooper .packetevents .protocol .player .TextureProperty ;
77import com .github .retrooper .packetevents .protocol .player .UserProfile ;
8+ import com .github .retrooper .packetevents .protocol .world .Location ;
89import com .github .retrooper .packetevents .wrapper .PacketWrapper ;
910import com .github .retrooper .packetevents .wrapper .play .server .WrapperPlayServerDestroyEntities ;
1011import com .github .retrooper .packetevents .wrapper .play .server .WrapperPlayServerEntityHeadLook ;
1314import com .github .retrooper .packetevents .wrapper .play .server .WrapperPlayServerPlayerInfoUpdate ;
1415import com .github .retrooper .packetevents .wrapper .play .server .WrapperPlayServerSpawnPlayer ;
1516import me .tofaa .entitylib .EntityLib ;
17+ import me .tofaa .entitylib .container .EntityContainer ;
1618import me .tofaa .entitylib .meta .EntityMeta ;
1719import java .util .EnumSet ;
1820import java .util .List ;
@@ -54,6 +56,15 @@ protected PacketWrapper<?> createSpawnPacket() {
5456 return packets ;
5557 }
5658
59+ @ Override
60+ public boolean spawn (Location location , EntityContainer parent ) {
61+ if (isSpawned ()) return false ;
62+
63+ sendPacketToViewers (tabListPacket ());
64+
65+ return super .spawn (location , parent );
66+ }
67+
5768 public WrapperPlayServerPlayerInfoUpdate tabListPacket () {
5869 EnumSet <WrapperPlayServerPlayerInfoUpdate .Action > actions = EnumSet .of (
5970 WrapperPlayServerPlayerInfoUpdate .Action .ADD_PLAYER ,
You can’t perform that action at this time.
0 commit comments