RuneHive-Game
Loading...
Searching...
No Matches
SendMinimapState.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
6public class SendMinimapState extends OutgoingPacket {
7
8 private final MinimapState state;
9
11 super(99, 1);
12 this.state = state;
13 }
14
15 @Override
16 public boolean encode(Player player) {
17 builder.writeByte(state.getCode());
18 return true;
19 }
20
21 /**
22 * Represents the state a minimap can be in.
23 *
24 * @author Seven
25 */
26 public enum MinimapState {
27 /**
28 * The default state where the map is visible and clicking is enabled.
29 */
31
32 /**
33 * The state where the map is visible, but clicking is disabled.
34 */
36
37 /**
38 * The state where the map is pitch black, and clicking is disabled.
39 */
41
42 private final int code;
43
45 this.code = code;
46 }
47
48 public int getCode() {
49 return code;
50 }
51 }
52
53}
This class represents a character controlled by a player.
Definition Player.java:125
OutgoingPacket(int opcode, int capacity)
UNCLICKABLE
The state where the map is visible, but clicking is disabled.
NORMAL
The default state where the map is visible and clicking is enabled.
HIDDEN
The state where the map is pitch black, and clicking is disabled.