readd AFK/un-AFK event

This commit is contained in:
UnknownShadow200 2018-07-10 01:13:19 +10:00
parent 11bc7eebd1
commit 06284cece2
3 changed files with 3 additions and 1 deletions

View File

@ -42,6 +42,7 @@ namespace MCGalaxy.Commands.Chatting {
p.CheckForMessageSpam();
}
p.AFKCooldown = DateTime.UtcNow.AddSeconds(2);
OnPlayerActionEvent.Call(p, PlayerAction.AFK, null, cantSend);
} else {
if (cantSend) {
Player.Message(p, "You are no longer marked as being AFK.");
@ -49,6 +50,7 @@ namespace MCGalaxy.Commands.Chatting {
ShowMessage(p, "-λNICK%S- is no longer AFK");
p.CheckForMessageSpam();
}
OnPlayerActionEvent.Call(p, PlayerAction.UnAFK, null, cantSend);
}
}

View File

@ -19,7 +19,7 @@ using System;
using BlockID = System.UInt16;
namespace MCGalaxy.Events.PlayerEvents {
public enum PlayerAction { Me, Referee, UnReferee };
public enum PlayerAction { Me, Referee, UnReferee, AFK, UnAFK };
public enum MouseButton { Left, Right, Middle }
public enum MouseAction { Pressed, Released }
public enum TargetBlockFace { AwayX, TowardsX, AwayY, TowardsY, AwayZ, TowardsZ, None }