Use cache for toggling commandspy

This commit is contained in:
Telesphoreo 2022-11-26 04:24:52 -06:00
parent 76952e33b8
commit ed638679b2
No known key found for this signature in database
GPG key ID: B5CDDEBA526C0130

View file

@ -22,7 +22,7 @@ public class CommandSpyCMD extends PlexCommand
{
if (playerSender != null)
{
PlexPlayer plexPlayer = DataUtils.getPlayer(playerSender.getUniqueId());
PlexPlayer plexPlayer = plugin.getPlayerCache().getPlexPlayer(playerSender.getUniqueId());
plexPlayer.setCommandSpy(!plexPlayer.isCommandSpy());
DataUtils.update(plexPlayer);
send(sender, messageComponent("toggleCommandSpy")