Skip to content

Commit

Permalink
Ignore backpack requests for NPCs (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgH93 committed Mar 11, 2021
1 parent c1cf6e6 commit 0aee9bf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 0aee9bf

Please sign in to comment.