From 9dff07e6c2cc113dd07c0c7d76639d4147fb75ab Mon Sep 17 00:00:00 2001 From: Chris <2648373+QuiCM@users.noreply.github.com> Date: Tue, 2 Jun 2020 19:18:43 +0930 Subject: [PATCH] Refactor EmojiHandler to implement IPacketHandler --- TShockAPI/Handlers/EmojiHandler.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/TShockAPI/Handlers/EmojiHandler.cs b/TShockAPI/Handlers/EmojiHandler.cs index b21cd53e..f32993d1 100644 --- a/TShockAPI/Handlers/EmojiHandler.cs +++ b/TShockAPI/Handlers/EmojiHandler.cs @@ -1,17 +1,18 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using static TShockAPI.GetDataHandlers; namespace TShockAPI.Handlers { /// /// Handles emoji packets and checks for validity and permissions /// - public class EmojiHandler + public class EmojiHandler : IPacketHandler { - public void OnReceiveEmoji(object sender, GetDataHandlers.EmojiEventArgs args) + /// + /// Invoked when an emoji is sent in chat. Rejects the emoji packet if the player is spoofing IDs or does not have emoji permissions + /// + /// + /// + public void OnReceive(object sender, EmojiEventArgs args) { if (args.PlayerIndex != args.Player.Index) {