RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
DropViewerListener.java
1package com.osroyale.net.packet.in;
2
3import com.osroyale.game.world.entity.mob.player.Player;
4import com.osroyale.net.packet.ClientPackets;
5import com.osroyale.net.packet.GamePacket;
6import com.osroyale.net.packet.PacketListener;
7import com.osroyale.net.packet.PacketListenerMeta;
8import org.jire.tarnishps.event.widget.DropViewerEvent;
9
10@PacketListenerMeta({ClientPackets.NPC_DROP_VIEWER})
30
31public class DropViewerListener implements PacketListener {
32
33 @Override
34 public void handlePacket(Player player, GamePacket packet) {
35 final String context = packet.getRS2String();
36 if (context == null || context.isEmpty() || context.equalsIgnoreCase("null")) {
37 return;
38 }
39
40 player.getEvents().widget(player, new DropViewerEvent(context));
41 }
42}
void handlePacket(Player player, GamePacket packet)