mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 08:24:46 +00:00
Implemented several more events for players, including a click event, key event, fall event, and the basic entity living hurt, killed, and kills events, among others.
This commit is contained in:
1 parent
6c8c7671b8
commit
6752f8baec
38 files changed
+763
-249
No files matched your search
@@ -60,13 +60,21 @@ public class PacketHandlerPlayer{
|
||||
if(npc == null || npc.advanced.role != EnumRoleType.Companion || player != npc.getOwner())
|
||||
return;
|
||||
NoppesUtilServer.sendOpenGui(player, EnumGuiType.CompanionInv, npc);
|
||||
} else if(type == EnumPlayerPacket.KeyPressed) {
|
||||
}
|
||||
else if(type == EnumPlayerPacket.KeyPressed) {
|
||||
if(ScriptController.Instance.languages.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
EventHooks.onPlayerKeyPressed(player, buffer.readInt(), buffer.readBoolean(), buffer.readBoolean(), buffer.readBoolean(), buffer.readBoolean());
|
||||
}
|
||||
else if(type == EnumPlayerPacket.MouseClicked) {
|
||||
if(ScriptController.Instance.languages.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
EventHooks.onPlayerMouseClicked(player, buffer.readInt(), buffer.readInt());
|
||||
}
|
||||
else if(type == EnumPlayerPacket.FollowerHire){
|
||||
EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
|
||||
if(npc == null || npc.advanced.role != EnumRoleType.Follower)
|
||||
|
||||
Reference in new issue
Block a user