RuneHive-Game
Loading...
Searching...
No Matches
SendPlayerIndex.java
Go to the documentation of this file.
1package com.runehive.net.packet.out;
2
3import com.runehive.game.world.entity.mob.player.Player;
4import com.runehive.net.packet.OutgoingPacket;
5
6/**
7 * Sends a player index to the client.
8 *
9 * Created by Daniel on 2016-12-04.
10 */
11public class SendPlayerIndex extends OutgoingPacket {
12
13 private final int index;
14
15 public SendPlayerIndex(int index) {
16 super(201, 2);
17 this.index = index;
18 }
19
20 @Override
21 public boolean encode(Player player) {
22 builder.writeShort(index);
23 return true;
24 }
25
26}
This class represents a character controlled by a player.
Definition Player.java:125
OutgoingPacket(int opcode, int capacity)