A bit more work on the API

This commit is contained in:
Focusvity
2022-05-18 20:31:15 +10:00
parent 7fe28ae8cb
commit 7efa151157
19 changed files with 89 additions and 47 deletions

View File

@ -131,7 +131,7 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
if (sender instanceof Player player)
{
PlexPlayer plexPlayer = PlayerCache.getPlexPlayerMap().get(player.getUniqueId());
PlexPlayer plexPlayer = plugin.getPlayerCache().getPlexPlayerMap().get(player.getUniqueId());
if (plugin.getSystem().equalsIgnoreCase("ranks"))
{
@ -587,7 +587,7 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
protected PlexPlayer getOnlinePlexPlayer(String name)
{
Player player = getNonNullPlayer(name);
PlexPlayer plexPlayer = PlayerCache.getPlexPlayer(player.getUniqueId());
PlexPlayer plexPlayer = plugin.getPlayerCache().getPlexPlayer(player.getUniqueId());
if (plexPlayer == null)
{
throw new PlayerNotFoundException();

View File

@ -38,7 +38,7 @@ public class AdminChatCMD extends PlexCommand
{
if (plugin.getSystem().equalsIgnoreCase("ranks"))
{
PlexPlayer plexPlayer = PlayerCache.getPlexPlayerMap().get(player.getUniqueId());
PlexPlayer plexPlayer = plugin.getPlayerCache().getPlexPlayerMap().get(player.getUniqueId());
if (plexPlayer.getRankFromString().isAtLeast(Rank.ADMIN) && plexPlayer.isAdminActive())
{
player.sendMessage(PlexUtils.messageComponent("adminChatFormat", sender.getName(), message));