@Override public boolean isSleeping() { return he.isSleeping(); }
public void open(HumanEntity player) { if (player.isSleeping()) { player.sendMessage(Translation.getString("Message.No.CanUse", player)); return; } if (inventory == null) { inventory = MyPetApi.getCompatUtil().getComapatInstance(IconMenuInventory.class, "util.iconmenu", "IconMenuInventory"); } inventory.open(this, player); }
if (entity.getEntity() instanceof HumanEntity && ((HumanEntity) entity.getEntity()).isSleeping()) { PacketUtil.sendPacket(viewer, PacketType.OUT_BED.newInstance((HumanEntity) entity.getEntity(), entity.loc.x.block(), entity.loc.y.block(), entity.loc.z.block()));