Exiled-Team / EXILED

A high-level plugin framework for SCP: Secret Laboratory servers. It offers an event system for developers to hook in order to manipulate or change game code, or implement their own functions.
https://www.exiled.to/
Other
274 stars 181 forks source link

[BUG] IsCuffed property is False for players cuffed through Remote Admin panel #1963

Closed tpd1864blake closed 1 year ago

tpd1864blake commented 1 year ago

To Reproduce Steps to reproduce the behavior:

  1. Go into the Remote Admin panel and Disarm a player either through the Inventory menu, or the command disarm [id]
  2. Hook into some event and run Log.Info($"Cuffer: {Player.Cuffer} - IsCuffed: {Player.IsCuffed}");
  3. Trigger the event and check the console. Cuffer is set to null and IsCuffed is set to False.

Expected behavior IsCuffed should return True if the player is detained by an administrator.

Server logs No notable logs

EXILED Version ("latest" is not a version): 7.2.0

Results of show plugins command in console: Custom Escape Logic, Exiled.Events, Exiled.CustomItems, etc.

Additional context Cuffing other players, or cuffing a player through plugins seems to work fine, but Exiled seems to completely ignore cases where a player is cuffed through the Remote Admin panel (which is also evident by players still being able to use items if cuffed through remote admin but not if cuffed manually).

tpd1864blake commented 1 year ago

While Player.IsCuffed does not properly account for Remote Admin cuffing, it seems that I am able to work around this with Player.Inventory.IsDisarmed()