Merge branch 'general-devel' into handlegolfpacket

This commit is contained in:
Patrikkk 2020-06-02 11:53:32 +02:00 committed by GitHub
commit f9c59bb023
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View file

@ -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
{
/// <summary>
/// Handles emoji packets and checks for validity and permissions
/// </summary>
public class EmojiHandler
public class EmojiHandler : IPacketHandler<EmojiEventArgs>
{
public void OnReceiveEmoji(object sender, GetDataHandlers.EmojiEventArgs args)
/// <summary>
/// Invoked when an emoji is sent in chat. Rejects the emoji packet if the player is spoofing IDs or does not have emoji permissions
/// </summary>
/// <param name="sender"></param>
/// <param name="args"></param>
public void OnReceive(object sender, EmojiEventArgs args)
{
if (args.PlayerIndex != args.Player.Index)
{