RuneHive-Game
Loading...
Searching...
No Matches
DropViewerListener.java
Go to the documentation of this file.
1package com.runehive.net.packet.in;
2
3import com.runehive.game.world.entity.mob.player.Player;
4import com.runehive.net.packet.ClientPackets;
5import com.runehive.net.packet.GamePacket;
6import com.runehive.net.packet.PacketListener;
7import com.runehive.net.packet.PacketListenerMeta;
8import org.jire.runehiveps.event.widget.DropViewerEvent;
9
11public class DropViewerListener implements PacketListener {
12
13 @Override
14 public void handlePacket(Player player, GamePacket packet) {
15 final String context = packet.getRS2String();
16 if (context == null || context.isEmpty() || context.equalsIgnoreCase("null")) {
17 return;
18 }
19
20 player.getEvents().widget(player, new DropViewerEvent(context));
21 }
22}
This class represents a character controlled by a player.
Definition Player.java:125
Client -> Server packet opcodes.
Represents a single game packet.
void handlePacket(Player player, GamePacket packet)
Handles the packet that has just been received.
An annotation that describes what client -> server packets a PacketListener can listen to.