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