Beispiel #1
0
  public void sendData(Player[] players, EntityMetadata data) {
    SetEntityDataPacket pk = new SetEntityDataPacket();
    pk.eid = this.getId();
    pk.metadata = data == null ? this.dataProperties : data;

    Server.broadcastPacket(players, pk);
  }
Beispiel #2
0
  public void sendData(Player player, EntityMetadata data) {
    SetEntityDataPacket pk = new SetEntityDataPacket();
    pk.eid = player == this ? 0 : this.getId();
    pk.metadata = data == null ? this.dataProperties : data;

    player.dataPacket(pk);
  }