Merge branch 'general-devel' into handlegolfpacket
This commit is contained in:
commit
f9c59bb023
2 changed files with 9 additions and 8 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue