Ignore backpack requests for NPCs (#156)

This commit is contained in:
GeorgH93 2021-03-11 16:49:33 +01:00
parent c1cf6e6316
commit 0aee9bf302
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 GeorgH93
* Copyright (C) 2021 GeorgH93
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -195,7 +195,7 @@ protected String getPlayerFormattedUUID(OfflinePlayer player)
public void getBackpack(final OfflinePlayer player, final Callback<at.pcgamingfreaks.Minepacks.Bukkit.API.Backpack> callback, final boolean createNewOnFail)
{
if(player == null)
if(player == null || player.getClass().getName().contains("NPC"))
{
return;
}