Add method to access owner
Makes handling ISpecialInventory ownership much more consistent with a lot less spaghetti.
This commit is contained in:
@@ -80,6 +80,11 @@ public class SpecialEnderChest extends InventoryEnderChest implements ISpecialEn
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Player getPlayer() {
|
||||
return owner.getBukkitEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
this.owner.getEnderChest().update();
|
||||
|
@@ -212,6 +212,11 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
|
||||
this.playerOnline = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull HumanEntity getPlayer() {
|
||||
return this.player.getBukkitEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack splitStack(int i, final int j) {
|
||||
List<ItemStack> list = this.items;
|
||||
|
Reference in New Issue
Block a user