mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-26 12:46:04 +01:00
fixed bug
This commit is contained in:
parent
1f5dd50d3f
commit
4067a85bce
@ -100,7 +100,7 @@ public abstract class CitizensNPC extends AbstractNPC {
|
||||
|
||||
@Override
|
||||
public boolean openInventory(Player player) {
|
||||
if (!isSpawned() || getTrait(Inventory.class).getContents() == null)
|
||||
if (!isSpawned())
|
||||
return false;
|
||||
getInventory().setContents(getTrait(Inventory.class).getContents());
|
||||
inventory.show(player);
|
||||
|
@ -17,6 +17,7 @@ public class Inventory implements Trait {
|
||||
private ItemStack[] contents;
|
||||
|
||||
public Inventory() {
|
||||
contents = new ItemStack[36];
|
||||
}
|
||||
|
||||
public Inventory(org.bukkit.inventory.Inventory inventory) {
|
||||
|
Loading…
Reference in New Issue
Block a user