2018-05-13 22:43:20 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Jitse Boonstra
|
|
|
|
*/
|
|
|
|
|
2019-08-03 13:47:12 +02:00
|
|
|
package net.jitse.npclib.internal;
|
2018-05-13 22:43:20 +02:00
|
|
|
|
2020-07-14 15:13:26 +02:00
|
|
|
import net.jitse.npclib.api.state.NPCAnimation;
|
2019-10-20 10:48:12 +02:00
|
|
|
import net.jitse.npclib.api.state.NPCSlot;
|
2018-05-13 22:43:20 +02:00
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Jitse Boonstra
|
|
|
|
*/
|
2019-10-21 09:49:23 +02:00
|
|
|
interface NPCPacketHandler {
|
2018-05-13 22:43:20 +02:00
|
|
|
|
|
|
|
void createPackets();
|
|
|
|
|
2020-07-16 10:14:23 +02:00
|
|
|
void createPackets(Player player);
|
|
|
|
|
2018-05-13 22:43:20 +02:00
|
|
|
void sendShowPackets(Player player);
|
|
|
|
|
2019-09-26 00:02:37 +02:00
|
|
|
void sendHidePackets(Player player);
|
2019-10-20 10:48:12 +02:00
|
|
|
|
|
|
|
void sendMetadataPacket(Player player);
|
|
|
|
|
2019-10-20 11:36:37 +02:00
|
|
|
void sendEquipmentPacket(Player player, NPCSlot slot, boolean auto);
|
2019-10-20 10:48:12 +02:00
|
|
|
|
2020-07-14 15:13:26 +02:00
|
|
|
void sendAnimationPacket(Player player, NPCAnimation animation);
|
|
|
|
|
2019-10-20 10:48:12 +02:00
|
|
|
default void sendEquipmentPackets(Player player) {
|
|
|
|
for (NPCSlot slot : NPCSlot.values())
|
2019-10-20 11:36:37 +02:00
|
|
|
sendEquipmentPacket(player, slot, true);
|
2019-10-20 10:48:12 +02:00
|
|
|
}
|
2018-05-13 22:43:20 +02:00
|
|
|
}
|